Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Problems
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 22nd, 2011, 10:15 AM
feri feri is offline
 
Join Date: Oct 2010
Posts: 74
Default Filtering with widgets and Widget Context plugin error

Yesterday I followed the tutorial for creating filters instead of categories. So far so good. I have tried to solve this problem for 5 hours now, with no success.

The problem I have is with the Widget Context plugin, if I want to display the filtering widget based on URL settings in Widget Context (I want filtering in one category only), the widget does not get displayed. I use the settings your provided (store/category/categoryname*) plus 'Show on selected' checked. If I do not specify anything, the widgets display normally.

I use Thesis theme, thought maybe this is the problem, but after I tried the Widget Context plugin on another site with Thesis and without DataFeedR, it worked.

Then I thought maybe Thesis+DFR+Widget Context plugin combo does not work together somehow. I tried TwentyTen theme on the same site, but the Widget Context plugin did not work with this theme either.

I've read everything I've found on Widget Context plugin, tried every possible URL settings I came across, but it seems to me that the URL filtering does not work 100%, as some people told that they had absolutely no problems, while others had problems every time. There were people who had success with 5 of their sites, but Widget Context plugin did not work on the next site of theirs.

Then I tried Thesis+DFR+Widget Context plugin combo on another shop of mine. No success either.

Then I tried Widget Logic plugin too on these two shops specifying the correct URL I wanted, but no luck either. Widget Logic URL filtering does not work with Thesis nor TwentyTen theme.

Do you have any idea what went wrong?

Or should I simply forget filtering on those shops where it makes no sense to display filtering widgets in every category?

There is clearly an error, just I can not figure it out where...

shop IDs I was working with: 15618 and 14745

Last edited by feri : February 22nd, 2011 at 10:16 AM.
  #2  
Old February 22nd, 2011, 10:26 AM
feri feri is offline
 
Join Date: Oct 2010
Posts: 74
Default

I've found this comprehensive article about Wordpress widget context plugins if anyone is interested: Choosing a widget control plugin
  #3  
Old February 22nd, 2011, 10:27 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

I had a similar problem with WC in the past. I contacted the author of the plugin with the following information:

Quote:
I did notice that sometimes it wasn't working, though. Basically, for some reason, $_SERVER['SERVER_NAME'] was returning my site's URL without the "www" in the get_current_url() function.

Since my site uses "www" in the URL, the "Show on selected" context wasn't working when targeting by URL.

I noticed match_path() just requires the path and not the http(s)://www or the domain name. So I rewrote some of the code and it seems to work.

Basically, I completely deleted the get_current_url() function. I added $wp as a global variable in the check_widget_visibility() function and then replaced this line:

$current_url = $this->get_current_url();

with this line:

$current_url = $wp->request;
Maybe if you make those changes to the Widget Context plugin, it will work.

Eric
  #4  
Old February 22nd, 2011, 12:08 PM
feri feri is offline
 
Join Date: Oct 2010
Posts: 74
Default

I did change
$current_url = $this->get_current_url();
to
$current_url = $wp->request;

but as I am no PHP expert, could not do this:
"I added $wp as a global variable in the check_widget_visibility() function"

and I think it is needed... can you be more specific please?
  #5  
Old February 22nd, 2011, 12:10 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Change this:
PHP Code:
    function check_widget_visibility($vis_settings = array()) {
        global 
$paged
To This:
PHP Code:
    function check_widget_visibility($vis_settings = array()) {
        global 
$paged$wp
  #6  
Old February 22nd, 2011, 01:39 PM
feri feri is offline
 
Join Date: Oct 2010
Posts: 74
Default

That was an easy modification Long story short, did not work, but in the end it did with these settings:

store/category/houses*

There is NO dash at the end... I know the plugin says it should have, but for me it's working like this.

I tried on a brand new shop and and older shop too, your modifications and this setting above works everywhere.

Thanks! Support is excellent as always!
  #7  
Old February 22nd, 2011, 01:54 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Glad you got it working!
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fatal Error When Using Search Widget briantalk Problems 6 January 22nd, 2011 10:17 AM
Fatal Error in sidebar widgets sbanks Problems 1 January 20th, 2011 10:13 PM
Error When Trying To Activate V3 Plugin stayfitcentral Problems 6 January 15th, 2011 11:10 AM


All times are GMT -5. The time now is 11:32 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.