Image Select not showing from a Dynamic selection

Support MB Elementor Integrator Image Select not showing from a Dynamic selectionResolved

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #27831
    dubiousmoot@gmail.com[email protected]
    Participant

    Hello, as far as the initial selection it's working. I have an option of 2 images and the database is showing which image I have selected correctly.
    I have created a loop for Property Archives on a real-estate site.
    The dynamic selection is showing and I can pick that field but the image does not show.
    (If I simply select an image from the library it will show)

    Here is the code for the image select

    [
                    'name'       => __( 'Sales Person', 'your-text-domain' ),
                    'id'         => $prefix . 'sales_person',
                    'type'       => 'image_select',
                    'options'    => [
                        'image01' => __( 'http://mysite.ca/realestate400/wp-content/uploads/2021/04/female-1.png', 'your-text-domain' ),
                        'image02' => __( 'http://mysite.ca/realestate400/wp-content/uploads/2021/04/female02.png', 'your-text-domain' ),
                    ],
                    'save_field' => 1,
                ]

    Thank you

    #27848
    Long NguyenLong Nguyen
    Moderator

    Hi,

    The image URLs are not accessible

    http://mysite.ca/realestate400/wp-content/uploads/2021/04/female-1.png
    http://mysite.ca/realestate400/wp-content/uploads/2021/04/female02.png

    Can you please change it to your site URL http://zentyx.ca/?

    http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female-1.png
    http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female02.png

    #27851
    dubiousmoot@gmail.com[email protected]
    Participant
    [
                    'name'       => __( 'Sales Person', 'your-text-domain' ),
                    'id'         => $prefix . 'sales_person',
                    'type'       => 'image_select',
                    'options'    => [
                        'image01' => __( 'http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female-1.png', 'your-text-domain' ),
                        'image02' => __( 'http://zentyx.ca/realestate400/wp-content/uploads/2021/04/female02.png', 'your-text-domain' ),
                    ],
                    'save_field' => 1,
                ]
    #27853
    dubiousmoot@gmail.com[email protected]
    Participant

    I changed my url to Mysite.ca in the code block here. It's correct on the site

    #27873
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Can you please share some screenshots of the issue? You can also follow the Debugging Information step to troubleshoot the issue https://support.metabox.io/topic/how-to-create-a-new-topic/.

    Let me know how it goes.

    #27915
    dubiousmoot@gmail.com[email protected]
    Participant

    Hello Long, thanks for that info. I think this error info may help...

    Warning: Invalid argument supplied for foreach() in /home/zentyx/public_html/realestate400/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-elementor-integrator/src/Traits/Fields/Image.php on line 31

    Here is the set up with a simple image grab directly from the library
    With a direct selection from the Library

    And here is the set up with the metabox image select
    with the error

    Thank you so much for your time

    #27923
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Thanks for your additional information.

    If you are using the Elementor page builder, please use another image field such as single_image. The field type image_select saves the value image01 or image02 in the database instead of image ID, so the Elementor cannot render the image based on that value.

    Get more details on the documentation https://docs.metabox.io/fields/image-select/#data

    #27940
    dubiousmoot@gmail.com[email protected]
    Participant

    Okay, I'll set it up another way.

    Thanks for your time

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.