marcodeltongo / thematic

Automatically exported from code.google.com/p/thematic
0 stars 0 forks source link

Plugin Compatibility: no widgets in wp e-commerce 3.8.6 product page #119

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. activate thematic & wp e-commerce
2. visit a product page

What is the expected output? What do you see instead?
There should be widgets. There are no widgets.

What version of the product are you using? On what operating system?
Thematic 0.9.7.8 development version child theme

Please provide any additional information below.
plugins/wp-e-commerce/wpsc-includes/theme.functions.php contains this line:
add_action('template_redirect', 'wpsc_all_products_on_page');

but the function wpsc_all_products_on_page() does a
exit;

so any pending template_redirect actions are cancelled, such as
add_action('template_redirect', 'thematic_connect_functions');

within themes/thematic/library/extensions/widgets-extensions.php
and thematic_connect_functions() is necessary to display widgets

as a workaround, the add_action should specify a priority higher than the 
default 10, such as
add_action('template_redirect', 'thematic_connect_functions', 9);

of course, the wp e-commerce crew should have specified a lower than default 
priority like 11, but they didn't :P

Original issue reported on code.google.com by yitw...@gmail.com on 26 Aug 2011 at 7:55

GoogleCodeExporter commented 9 years ago
Thanks for letting us know. This sounds like something that would be better 
dealt with on their end. Did you notified them?

Original comment by eugene.m...@gmail.com on 17 Jan 2012 at 9:22

GoogleCodeExporter commented 9 years ago
naturally I notified them, but they did not commit to fixing it, at least not 
in the way I suggested, so I reported it here as a service to anyone having the 
same problem

Original comment by yitw...@gmail.com on 17 Jan 2012 at 9:44

GoogleCodeExporter commented 9 years ago
If you can provide a link to the thread where you posted over there. I'll join 
the discussion.

Original comment by eugene.m...@gmail.com on 17 Jan 2012 at 10:11

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/wp-e-commerce/issues/detail?id=564#c11
but you could have found it by googling--i did. And thanks, but have to warn 
you, it's an old discussion i haven't kept up with since my clients tend to use 
Shopp rather than e-commerce.

Original comment by yitw...@gmail.com on 17 Jan 2012 at 11:01

GoogleCodeExporter commented 9 years ago
Thanks! I appreciate the report and the link.

Original comment by eugene.m...@gmail.com on 18 Jan 2012 at 2:37

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This is really good to know. There have been several threads in the forum with 
people wondering where the sidebars went. 

The solution is simple. Remove the action and add it back again with a lower 
priority. Easily done in a child theme like so:

function switch_ecommerce_actions() {
    remove_action('template_redirect', 'wpsc_all_products_on_page');
    add_action('template_redirect', 'wpsc_all_products_on_page', 15);
}
add_action('init','switch_ecommerce_actions');

Original comment by invistr...@gmail.com on 26 Jan 2012 at 9:07

GoogleCodeExporter commented 9 years ago
Originally we had the widgetized areas assign action hooks during widgets_init. 
The result was conditional tags didn't work to un/re-hook. We then introduced  
thematic_connect_functions() and hooked it to template_redirect; but that was 
not the best choice noting the case in point. 

wp_head is a more appropriate hook for thematic to be using for this.

This bug should now be fixed in r832

Original comment by eugene.m...@gmail.com on 6 Feb 2012 at 10:53