Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • Johannes GrossJohannes Gross
    Participant

    Thanks for checking! Yes, I deactivated the Meta Box plugin and all the Meta Box add-ons. I am using only Meta Box AIO. But the password reveal icons are still not showing: https://scholarships.bocagrandewomansclub.org/

    Johannes GrossJohannes Gross
    Participant

    I switched to Meta Box AIO and disabled all the other Meta Box extensions but the password field when logging in or changing the password still has the icon missing: https://scholarships.bocagrandewomansclub.org/

    Can you take another look?

    Johannes GrossJohannes Gross
    Participant

    I came across the same observation today - the MB reset password form does not enforce any strength. Please fix this. The strange thing is that your LoginForm render_block code even has the provision for it but the password_strength value does not get populated since the field is missing in the Gutenberg block.

    public function render_block( $attributes ): string {
    		$form = Factory::make( [
    			'redirect'            => $attributes['redirect'],
    			'form_id'             => $attributes['form_id'],
    			'recaptcha_key'       => $attributes['recaptcha_key'],
    			'recaptcha_secret'    => $attributes['recaptcha_secret'],
    			'label_title'         => $attributes['label_title'],
    			'label_username'      => $attributes['label_username'],
    			'label_password'      => $attributes['label_password'],
    			'label_remember'      => $attributes['label_remember'],
    			'label_lost_password' => $attributes['label_lost_password'],
    			'label_submit'        => $attributes['label_submit'],
    			'id_username'         => $attributes['id_username'],
    			'id_password'         => $attributes['id_password'],
    			'id_remember'         => $attributes['id_remember'],
    			'id_submit'           => $attributes['id_submit'],
    			'confirmation'        => $attributes['confirmation'],
    			'value_username'      => $attributes['value_username'],
    			'value_remember'      => Helper::convert_boolean( $attributes['value_remember'] ),
    			'password_strength'   => $attributes['password_strength'],
    		], 'login' );
    		if ( empty( $form ) ) {
    			return '';
    		}

    I appreciate your help with this!

    in reply to: Model Search with Parent Permission Error #47288
    Johannes GrossJohannes Gross
    Participant

    Thank you!

    in reply to: Model Search with Parent Permission Error #47232
    Johannes GrossJohannes Gross
    Participant

    Thank you! I appreciate it.

    in reply to: Escaped Output After MB Blocks 1.5.0 Update #45490
    Johannes GrossJohannes Gross
    Participant

    Hi Peter,

    Thank you for your patience with my reply, I just created a fresh WordPress install and added MetaBox and MB Blocks 1.5.1.
    Then, I added the code below (as a custom plugin) to set up a simple metabox display:

    function twt_metabox_io_blocks($meta_boxes) {
    	$meta_boxes[] = array(
    		'id'              => 'twt-product-module',
    		'title'           => 'TWT Product Module',
    		'type'            => 'block',
    		'icon'            => 'editor-table',
    		'category'        => 'layout',
    		//'context'         => 'side',
    		'render_callback' => 'twt_render_product_module',
    		'supports'        => array(
    			'anchor'          => true,
    			'customClassName' => true,
    			'align' => ['full','wide'],
    		),
    		'fields'          => array(
    			array(
    				'name' => 'Price',
    				'id'   => 'price',
    				'type' => 'text',
    			)
    		)
    	);
    	return $meta_boxes;
    }
    
    function twt_render_product_module( $attributes): void {
    // Fields data.
    if ( empty( $attributes['data'] ) ) {
    	return;
    }
    // Custom CSS class name.
    $class = 'twt-product-module ' . ( $attributes['className'] ?? '' );
    if ( ! empty( $attributes['align'] ) ) {
    	$class .= " align{$attributes['align']}";
    }
    ?>
    <div class="<?= trim($class); ?>">
        Price in $:
    	<?php
    	echo $attributes['data']['price'];
    	?>
    </div>
    <?php
    }
    
    add_action('rwmb_meta_boxes', 'twt_metabox_io_blocks');

    When I enter $99 as the field value, I get the following output: Price in \$: \$99

    When I downgrade MB Blocks to version 1.4.2 the backslashes don't show.

    I will submit the login credentials through the contact form shortly.

    Thank you!

    in reply to: Escaped Output After MB Blocks 1.5.0 Update #45340
    Johannes GrossJohannes Gross
    Participant

    Thank you for looking into this. The price field is just a regular text field. Here is the code:

    $meta_boxes[] = array(
    		'id'              => 'twt-product-modules',
    		'title'           => 'TWT Product Modules',
    		'type'            => 'block',
    		'icon'            => 'editor-table',
    		'category'        => 'layout',
    		//'context'         => 'side',
    		'render_template' => get_stylesheet_directory() . '/blocks/twt-product-modules.php',
    		'supports'        => array(
    			'anchor'          => true,
    			'customClassName' => true,
    			'align' => ['full','wide'],
    		),
    		'fields'          => array(
    			array(
    				'name'          => '',
    				'id'            => 'modules',
    				'type'          => 'group',
    				'clone'         => true,
    				'sort_clone'    => true,
    				'collapsible'   => true,
    				'default_state' => 'collapsed',
    				'group_title'   => '{name}',
    				'fields'        => array(
    					array(
    						'name' => 'Name',
    						'id'   => 'name',
    						'type' => 'text',
    					),
    					array(
    						'name' => 'Price',
    						'id'   => 'price',
    						'type' => 'text',
    					),
    					array(
    						'name' => 'Button Label',
    						'id'   => 'btn_label',
    						'type' => 'text',
    					),
    					array(
    						'name' => 'Module URL',
    						'id'   => 'btn_url',
    						'type' => 'text',
    					),
    					array(
    						'name' => 'Image',
    						'id'   => 'img',
    						'desc' => '472 by 306 pixels',
    						'type' => 'single_image',
    					)
    				),
    			),
    		)
    	);
    <?php
    $attr = $attributes;
    if ( empty( $attr['data'] ) ) {
    	return;
    }
    // Assign anchor if available 
    $id = $attr['anchor'] ?? '';
    
    // Custom CSS class name.
    $class = trim('twt-product-modules ' . ( $attr['className'] ?? '' ));
    
    if ( ! empty( $attr['align'] ) ) {
    	$class .= " align{$attr['align']}";
    }
    
    if ( ! empty( $attr['data']['modules'] ) ) {
    	?>
    	<div<?= empty($id) ? '' : ' id="'.esc_attr($id).'"'; ?><?= empty( $class ) ? '' : ' class="'.esc_attr($class). '"'; ?>>
            <ul class="row twt-product-modules-row">
                <?php
                foreach($attr['data']['modules'] as $module) {
                    ?>
                    <li class="col-3 col-t-4 col-m-6">
                        <?php
                        if(empty($module['btn_url'])) {
                            ?><div class="twt-product-module"><?php
                        } else {
                            ?><a href="<?= $module['btn_url']; ?>" class="twt-product-module"><?php
    		                }
                        ?>
                        <?= wp_get_attachment_image($module['img'], 'medium_large', false, array('class' => 'img', 'alt' => '')); ?>
                        <div class="content">
                            <h3 class="name"><strong><?= $module['name']; ?><?php if(!empty($module['price'])) { ?>:</strong> <?= $module['price']; ?>
                            <?php } else { ?>
                                </strong>
                            <?php } ?>
                            </h3>
                            <?php if(!empty($module['btn_label'])) { ?>
                            <p class="btn-c"><span class="btn small"><?= $module['btn_label']; ?></span></p>
                            <?php } ?>
                        </div>
                        <?php
                        if(!empty($module['btn_url'])) {
                            ?></a><?php
                        } else {
                            ?></div><?php
                        }
                        ?>
                    </li>
                    <?php
                }
                ?>
            </ul>
    	</div>
    	<?php
    }

    Also, on a different site, I just ran into the same issue after upgrading to MB Blocks 1.5.0. A \ is added before $ signs. But this time, in my block render callback function. It affected my JS code that is included in the render_callback function (see below for how it added \ before $). After downgrading to MB Blocks 1.4.2 the \$ were no longer added.

    <script>
                jQuery(function(\$) {
                    let hccf_dtable = \$('#households-table').DataTable({

    Let me know if you need more information.

    Johannes GrossJohannes Gross
    Participant

    I am experiencing the same PHP Fatal error as Ben R when adding a new element to a model after updating to version 2.1.9. I then restored version 2.1.8 and it is working again without any issues.

    in reply to: User Profile Gutenberg Blocks Not Available #42959
    Johannes GrossJohannes Gross
    Participant

    Thank you!

    in reply to: PHP 8.0 shows deprecated notification #32829
    Johannes GrossJohannes Gross
    Participant

    Thank you!

    Johannes GrossJohannes Gross
    Participant

    That makes sense. However, when I tried it, this also require the logged in user to also write in their password (twice) to be able to update their e.g. first name.

    <?= do_shortcode('[mb_user_profile_info id="twt-public-profile" form_id="twt-edit-profile" label_submit="Update Profile" confirmation="Your profile has been updated successfully. Thank you."]'); ?>
        <h2>Set a New Password</h2>
        <?= do_shortcode('[mb_user_profile_info id="rwmb-user-info" password_strength="very-weak" label_submit="Update Password" confirmation="Your password has been updated. Thank you."]'); ?>
    Johannes GrossJohannes Gross
    Participant

    Any update on this? I am having the same issue.

    Johannes GrossJohannes Gross
    Participant

    I was able to display the first_name and last_name field above the email address by using the following code:

     function add_more_registration_fields($fields) {
            $new_fields = [
                'first_name'  => [
                    'name'     => 'First Name',
                    'id'       => 'first_name',
                    'type'     => 'text',
                    'required' => 1
                ],
                'last_name'  => [
                    'name'     => 'Last Name',
                    'id'       => 'last_name',
                    'type'     => 'text',
                    'required' => 1
                ],
            ];
            $fields = array_merge( $new_fields, $fields );
            return $fields;
        }
    add_filter( 'rwmb_profile_register_fields',  'add_more_registration_fields'));
    in reply to: First submission from non-logged in users fails #21283
    Johannes GrossJohannes Gross
    Participant

    Thank you Long for your reply! Switching the title and content from within the shortcode to the custom metabox did the trick. 🙂

    in reply to: MB Blocks: Not Saving Order of Grouped Fields #17241
    Johannes GrossJohannes Gross
    Participant

    Thank you Anh!

Viewing 15 posts - 1 through 15 (of 20 total)