Home Forums WoodMart support forum Woodmart clashing with Woosa plugin

Woodmart clashing with Woosa plugin

Viewing 24 posts - 1 through 24 (of 24 total)
  • Author
    Posts
  • #642690

    kuba_sieniawski
    Participant

    Hi,
    I have a dropshipping plugin, Woosa, and when I enable it, the website does not load. I contacted Woosa support, and after checking, they said that something on the WoodMart template side is clashing and preventing the website from loading.
    Woosa support also confirmed that the plugin works fine with other templates, so the issue appears to be specific to the WoodMart theme.
    Would you be able to check this for me, please? The Woosa developers have verified that everything is fine on their end and advised me to contact WoodMart support. The plugin I’m using is “Woosa – vidaXL Dropshipping for WooCommerce,” which connects my shop with VidaXL.
    Thank you very much
    Kuba

    #642694

    Artem Temos
    Keymaster

    Hello,

    Could you please specify what exactly on the theme side crashes according to the plugin developers? Did they notice any errors? If so, please send us some screenshots so we can understand how it is related to the theme.

    Kind Regards

    #643225

    kuba_sieniawski
    Participant

    Hi, Im trying to get answer from the woosa support, but so far i have no luck. Is this something you could check on my site please? It does not load when the plugin is enabled, so wondering if something is clashing. with the template files. Would appreciate any help. Thank you so much! Kuba

    #643467

    Artem Temos
    Keymaster

    We need to get more details from the plugin developer to understand what kind of problem did they notice with the theme.

    #643830

    kuba_sieniawski
    Participant

    Hi,
    Below is what i got from developers, hopefully that will help with finding the issue:

    “Our developer further investigated the error log and here is his feedback:
    We’ve identified an issue with the Woodmart theme, as seen in the logs:

    #6 /home/decoriai/public_html/wp-content/themes/woodmart/inc/shortcodes/button.php(150): wp_get_attachment_image_url(Array)

    The problem is that wp_get_attachment_image_url() requires an integer (image ID), but the theme is passing an array instead, which is incorrect.

    Reference:
    The function expects an integer → wp_get_attachment_image_src()
    The hook we use requires an image ID, not an array → wp_get_attachment_image_src Hook

    The theme developer should update their implementation to pass the correct image ID instead of an array to prevent this issue.”

    Kind regards
    Kuba

    #643856

    Artem Temos
    Keymaster

    In this case, we need to get direct access to this log file so we can troubleshoot this error on your website in realtime and fix it.

    #643973

    kuba_sieniawski
    Participant

    Thanks, do you need ftp access? or just copy of the above file?

    #644011

    kuba_sieniawski
    Participant

    Below are ftp details.

    Thank you
    Kuba

    #644365

    Artem Temos
    Keymaster

    Thank you. Please send us also a path to the error log file where we can see the error you sent before.

    #644450

    kuba_sieniawski
    Participant

    Hi, please see below:

    Uncaught TypeError: strlen(): Argument #1 ($string) must be of type string, array given in /home/decoriai/public_html/wp-content/plugins/woosa-vidaxl-ds/vendor/woosa/post-remote-image/class-module-post-remote-image.php:138

    #644451

    kuba_sieniawski
    Participant

    logs are available via wordpress admin page – on the left there is VidaXL, and once clicked, there is a section in the middle screen to see logs.

    Thank you
    Kuba

    #644459

    Artem Temos
    Keymaster

    We don’t see the error in your dashboard mentioned here https://xtemos.com/forums/topic/woodmart-clashing-with-woosa-plugin/#post-643830
    As for the last error from the previous reply, it is not related to our theme.

    #644931

    kuba_sieniawski
    Participant

    please see attached log file. Hopefully that will give you more info.

    Im awaiting reply from woosa on where this file is saved.

    Thank you
    Kuba

    #644933

    kuba_sieniawski
    Participant

    Please see attached file with log.

    Attachments:
    You must be logged in to view attached files.
    #645050

    Artem Temos
    Keymaster

    As I can see from the error log, PHP fatal errors come from the plugin’s file. Check the screenshot https://gyazo.com/c59b62d5f799fc37862c81e2ac466eb2
    If so, it is not caused by the theme itself and need to be checked in the plugin.

    #645164

    kuba_sieniawski
    Participant

    Thanks, but everything works fine on a different template. The problem is that wp_get_attachment_image_url() requires an integer (image ID), but the theme is passing an array instead, which is incorrect. Can this be changed to test please?

    Thank you
    Kuba

    #645175

    Artem Temos
    Keymaster

    According to the stack trace in the log, our theme calls WordPress wp_get_attachment_image_url and pass the array. And this function can accept array according to official WordPress documentation
    https://gyazo.com/3892ef88c45843175c3f555f0e24a5ae
    https://developer.wordpress.org/reference/functions/wp_get_attachment_image_url/

    #645759

    kuba_sieniawski
    Participant

    Thank you for the explanation. Looks like the plugin developers are not willing to help. I will look for an alternative plugin so.

    Kind regards,
    Kuba

    #645818

    Artem Temos
    Keymaster

    You are always welcome. Let me know if there anything else I can help you with.

    #646119

    kuba_sieniawski
    Participant

    Hi,

    After reviewing all the available plugins, it turns out that the Woosa plugin is the only suitable option. 🙁 I understand that WordPress supports arrays, but is there any chance this can be adjusted to use an integer instead?

    This plugin is the last thing I need for the website to function, and I’ve spent so much time getting everything else to work. 🙁 If this requires significant modifications to the template, could you suggest another template from your list that passes an integer instead?

    I really need to get this working and have nearly exhausted all my options. 🙁 I would truly appreciate your help.

    Thank you so much
    Kuba

    #646126

    kuba_sieniawski
    Participant

    further to above i tried to troubleshoot this using chatgpt dev and got below code that can be replaced in button.php. I’ve tested and its working!!

    old:
    if ( woodmart_is_svg( wp_get_attachment_image_url( $image ) ) ) {
    $image_output = woodmart_get_svg_html( $image, $img_size );
    } elseif ( ! empty( $image[‘id’] ) ) {
    $image_output = woodmart_otf_get_image_html( $image[‘id’], $img_size );
    } else {
    $image_output = woodmart_otf_get_image_html( $image, $img_size );
    }

    new:
    if ( is_array( $image ) ) {
    $image = reset( $image ); // Ensure it’s not an array
    }

    if ( woodmart_is_svg( wp_get_attachment_image_url( $image ) ) ) {
    $image_output = woodmart_get_svg_html( $image, $img_size );
    } elseif ( is_array( $image ) && ! empty( $image[‘id’] ) ) {
    $image_output = woodmart_otf_get_image_html( $image[‘id’], $img_size );
    } else {
    $image_output = woodmart_otf_get_image_html( $image, $img_size );
    }

    Would you be able to confirm if this is good fix please?

    Thank you so much!
    Kuba

    #646360

    Artem Temos
    Keymaster

    Try to use the following code instead

    			if ( is_array( $image ) && ! empty( $image['id'] ) ) {
    				if ( woodmart_is_svg( wp_get_attachment_image_url( $image['id'] ) ) ) {
    					$image_output = woodmart_get_svg_html( $image['id'], $img_size );
    				} else {
    					$image_output = woodmart_otf_get_image_html( $image['id'], $img_size );
    				}
    			} elseif ( woodmart_is_svg( wp_get_attachment_image_url( $image ) ) ) {
    				$image_output = woodmart_get_svg_html( $image, $img_size );
    			} else {
    				$image_output = woodmart_otf_get_image_html( $image, $img_size );
    			}
    #646982

    kuba_sieniawski
    Participant

    Working as expected!

    Thank you so much!
    Kuba

    #647058

    Artem Temos
    Keymaster

    You are always welcome. Feel free to contact us if you have any further questions.

Tagged: 

Viewing 24 posts - 1 through 24 (of 24 total)

The topic ‘Woodmart clashing with Woosa plugin’ is closed to new replies.