• Resolved colighto

    (@colighto)


    Hello,

    Have tried to attempt upgrading our site to the latest version of this plugin but when I do the woocommerce product pages would stop working have downgraded back the plugin to version 1.2.5 can’t upgrade to 1.2.7 yet until the conflict is confirmed to be resolved.

    Thanks,
    Chris

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    @colighto What’s the issue you are facing?

    woocommerce product pages are giving you 404 or what?

    I have checked the shop and cart page and one of the product page it’s working fine. How can i reproduce the error? Does it only for some specific products?

    Thanks,
    Sami

    Thread Starter colighto

    (@colighto)

    It does not show 404 error but its loading the wrong content for woocommerce products.

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Does it for all products or for some specific?

    I don’t know if this is strictly related to your issue, but after last update I had a 500 error on one of my products.

    The problem turned out to be in

    /frontend/class-custom-permalinks-frontend.php

    and precisely the SQL condition (which occurs four times)

    p.post_type != 'nav_menu_item'

    in my case, that condition allowed the loading of a WooCommerce product variation (post_type ‘product_variation’) which is a big no-no ??

    I changed all occurrencies to

    post_type NOT IN ('nav_menu_item','product_variation')"

    and that fixed the problem (at least in my install/configuration).

    hope that helps somebody.

    (@Sami: thanks for the plugin! it’s a real life saver for me).

    • This reply was modified 7 years, 4 months ago by giuspe.
    • This reply was modified 7 years, 4 months ago by giuspe.

    @giuspe

    Thanks I think your solution gave me a hint since majority of our products are setup as variable products have not checked with simple products but if this is just an issue that happens with variable products this will become a major issue for our site once implemented will wait for this issue to get fixed.

    Chris

    @codegranite

    glad to be of help.

    if you know your way around some code the mod itself ain’t that hard, just replace the occurrencies in the file I referred in my previous comment.

    I should also point out that I left a little typo in my comment:

    post_type NOT IN ('nav_menu_item','product_variation')"

    should read

    post_type NOT IN ('nav_menu_item','product_variation')

    (no double quotes at the end)

    @giuspe

    yes I agree going around the code would be easy this solution you gave would help the plugin author replicate the issue and find a way around it on the next updates for now will keep the older version running until the next update is available and do another set of test. Thanks for pointing that part on the code this will be a great help on solving the issue hopefully not just for us but for anyone else who are having the same problems when loading variable products using the latest version of this plugin.

    @sasiddiqui

    I hope this comment of giuspe helps. majority of our products are setup as variable products have not yet tested on simple products but we had the updates implemented on our development server the variable products started showing a different content instead.

    BR
    Chris

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    @giuspe @codegranite My bad that i have missed this entire conversation. Just checked now.

    I have already released version with the minor changes which may solves the issue but not sure that i was not generated the issue till yet for my end.

    I would be feel glad if you guys check the latest version and provide your feedback accordingly. I’ll wait for your feedback.

    For the safe site, if anyone starts getting any issue in the latest version so, just download the previous version from here.
    https://www.ads-software.com/plugins/custom-permalinks/advanced/

    Thanks,
    Sami

    @sasiddiqui

    Cool thanks will try it here and let you know.

    • This reply was modified 7 years, 4 months ago by codegranite.
    Thread Starter colighto

    (@colighto)

    Hi @sasiddiqui,

    Thank you so much for the help I think this issue is connected to previous issue posted here (traces of the previous issue on other contents do still exist). I manage to download and test the code in here it still have the issue I tried to search where the problem here is and found that your query on line 64 on custom-permalinks/frontend/class-custom-permalinks-frontend.php have changed your previous query did include this line on previous version:

    , $wpdb->posts.ID ASC

    but on your latest version you decided to remove this on the query and because of the

    LIMIT 1

    the query manage to output the wrong content due to multiple postmeta issue it outputs the last item added on the db so I tried to add this back on statement:

    , p.ID ASC

    adding this line on the query did fixed the problem of displaying wrong content on our end. After a thorough test the plugin update is good I just need to keep the plugin causing the conflict deactivate to prevent the issue from escalating further.

    Thanks,
    Chris

    • This reply was modified 7 years, 4 months ago by colighto.
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Upgrade conflict with woocommerce’ is closed to new replies.