WooCommerce - excelling eCommerce
[resolved] template/shop missing in 2.1 upgrade (23 posts)

  1. alistairgd
    Posted 1 year ago #

    Upgrading woocommerce to 2.1 led to php errors on my installation.

    Warning: include(/home4/mqhost/public_html/91stscouts.org.uk/shop/wp-content/plugins/woocommerce/templates/shop/breadcrumb.php) [function.include]: failed to open stream: No such file or directory in /home4/mqhost/public_html/91stscouts.org.uk/shop/wp-content/plugins/woocommerce/includes/wc-core-functions.php on line 100

    It seems plugins/woocommerce/templates/shop is not included in the upgrade, or even in a new installation...?


  2. CockpitSeeker
    Posted 1 year ago #

    Path seems to be wrong.
    Instead of:

    • /woocommerce/templates/shop/breadcrumb.php

    maybe the plugin authors meant:

    • /woocommerce/templates/global/breadcrumb.php

    Indeed, as of woo 2.1, comparing to the previous version, it seems this "global" folder has been added.

    Wildguessing I'd say path hasn't been changed accordingly.

  3. CockpitSeeker
    Posted 1 year ago #

    Possible solution: rename the "global" folder to "shop". Problem is, maybe it would prevent other files from working. That's not very clean (plus in case of an update you have to re-do the changes).

    It looks more complicated than that. It's not a direct design error. Path is output via the wc-core-functions.php on line 100:

    • include( $located );

    $located refering to:

    • wc_locate_template( $template_name, $template_path, $default_path ); (line 96 of the same file)

    which refers to line 120:

    • function wc_locate_template( $template_name, $template_path = '', $default_path = '' ) (function that ends line 143)

    The way I see it, the 2 culprits could be:
    1. $template_path or
    2. $default_path

    If you go for culprit 1., line 122 tells us: $template_path = WC()->template_path(); which refers to the line 55: function wc_get_template_part( $slug, $name = '' ) that ends line 79.
    Basically woo is trying to look in yourtheme (line 60 to be precise) and yourtheme/woocommerce (line 70 precisely) folder if the template file is there.
    Possible solution: copy the breadcrumb file in your theme's directory or in a new created yourtheme/woocommerce folder (better solution, wouldn't be erased with an update but is going to be cumbersome for your theme folder).

  4. alistairgd
    Posted 1 year ago #

    Hmmm, good work there matey! I'll look into that!

  5. alistairgd
    Posted 1 year ago #

    I found breadcrumbs.php at


    shop is the name of my wordpress installation folder....

    Any closer...?

  6. CockpitSeeker
    Posted 1 year ago #

    As I checked, your theme (estore) is not a woocommerce one, so I think this file might be somewhat unrelated to woocommerce (can't be 100% sure).

    As I suggested above, try Solution #1 to rename the woocommerce "global" folder into "shop" to see what happens (if you get another error saying "No such file or directory", it's a miss obviously)

    Solution #2, the last I suggested, try and play with your theme folder creating a woocommerce folder and dropping a copy of the woocommerce breadcrumb file in it (or just dropping the breadcrumb file in your theme folder).

    I'm sorry I'm not updating to woo 2.1 myself so you're on your own with the testing.

    Don't hesitate to report both respective #1 and #2 warnings to see what's what.

  7. alistairgd
    Posted 1 year ago #

    Thanks mate I will try this tomorrow, too tired to attempt this stuff with due care and attention right now.

    Will report back tomorrow.

    Thanks again.

    I usually NEVER update anything on day 1, god knows what came over me today :o(

  8. aaplfan
    Posted 1 year ago #

    I copied from a backup the folder shop into the templates folder as a temp solution until we figure out what is going on and it made my error message go away.

  9. CockpitSeeker
    Posted 1 year ago #

    Did you try to just rename "global" to "shop" (I'd like to know if errors occur with such change as they have slightly different files inside)?

  10. aaplfan
    Posted 1 year ago #

    I did and it threw up even more errors it then looks for this templates/global/quantity-input.php) [function.include]: failed to open stream: No such file or directory

    Since the folder is renamed it can't find the other files in there

  11. lalune
    Posted 1 year ago #

    I did a symbolic link of global to shop and it looks like it's fine. No errors showing up so far.

  12. Elegant Themes
    Posted 1 year ago #

    This is a compatibility issue with our Elegant Theme you are using, which calls to the old folder structure. We are updating our themes now to accommodate for the change in file path that has occurred in WooCommerce 2.1. Stay tuned of updates, or adjust the path in functions.php of your theme manually. Just search for /shop and replace it with /global, or swing by our forums if you need more help. Thanks for the patience.

  13. CockpitSeeker
    Posted 1 year ago #

    @aaplfan: It seems then it's more of a problem than just a wrong path (files being wrongly distributed amont folders?)... at least for you :/

    @lalune: what do you mean by "symbolic link"?

    @Elegant Themes: I guess you're adressing alistairgd's initial issue. What about aaplfan's remark underlining whole files could be misplaced.
    Indeed, only copying the "shop" folder info the "template" one calmed the warnings for him (which doesn't necessarily mean woo is functionning properly btw).

    Please if you solved the issue with other clients already (have you?), tweaking your theme files, let us know what you did (as I suspect it's more than theme related... but I could be wrong).

    @woo-devs: if you guys read this, for what my opinion is worth, I find it too bad having to hackity-hack one's files (other than you plugin's) with custom plugin code to grant compatibility. It doesnt look like good practice to me.

  14. Coen Jacobs
    Posted 1 year ago #

    This is not an issue with the WooCommerce core, this is simply an issue of theme developers neglecting to make their themes compatible with the latest release. We've been communicating these changes since early November, have provided examples to work around these issues but nothing has been done until the day we release the final version. I'm very sorry for our users being affected by this issue, but it's out of our hands.

    Theme developers reading this, please stop ignoring our best practices to stop including all template files in themes. You don't need to include everything in your theme to style them appropriately and it will prevent issues like this when you forget to make your themes compatible with new releases.

  15. toleanu
    Posted 1 year ago #

    Hi @Coen Jacobs .

    I work in themes industry and when you have >20 themes is hard to keep up with news .

    Anyway , a link to how we can work around this issue would be better than pushing charges against developers.

    PS: Yes I've searched google and your website for that specific link.

    Thank you .

  16. CockpitSeeker
    Posted 1 year ago #

    @Coen Jacobs: thanks for your reply and giving the straight answer (it's all theme related after all).
    Thanks in advance for the link as well :). No bashing intended anywhere, otherwise I wouldn't be caring for woo in this troubleshooting-thread in the first place.

    I stand on my opinion that it's too bad woo doesn't work out of the box, but I understand there might be no other way (just like the template issue where theme devs had to hook their own wrapper's name to prevent misbehaviour)

  17. toleanu
    Posted 1 year ago #

  18. toleanu
    Posted 1 year ago #

    Found my problem :

    woocommerce_get_template('shop/breadcrumb.php', $args);

    changed to :

    woocommerce_get_template('global/breadcrumb.php', $args);

    Good luck to all other theme developers !

  19. CockpitSeeker
    Posted 1 year ago #

    Er... wait I'm confused, it's wc-core-functions.php you edited, right?

  20. lalune
    Posted 1 year ago #

    @CockpitSeeker: in a shell on the server, I made a "symbolic link", like a shortcut, to "Global" so that both "Global" and "Shop" exist and point to the same thing.

    Seems to have solved this problem for me.

  21. alistairgd
    Posted 1 year ago #

    @ Cockpitseeker, no it is functions.php in the elegant theme folder that needs the "shop" changed to "global". They answered my support query last night and I confirm it worked. They are updating their theme now.

    Thanks for you help up to that point though.

    And thanks to elegant themes for acting on my support request so quickly, as always.

  22. mich6
    Posted 1 year ago #

    I made a duplicate copy of the /template/global folder and renamed it shop, so there is both a global and shop folder with the same items in it, all seems to be working fine now

  23. ellebivr
    Posted 1 year ago #

    toleanu showed the right solution:
    go to /wp-content/themes/eStore/functions.php
    at line 82 change:
    woocommerce_get_template( 'shop/breadcrumb.php', $args );
    woocommerce_get_template( 'global/breadcrumb.php', $args );
    work fine

    Thanks toleanu

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.