Seg2Cat 2.7.0 not MSM compatible
Just installed Seg2Cat 2.7.0 on a MSM site. The filtering works great on the primary site, but on the secondary site, none of the segment_x_category_x variables work. The work-around for this on previous versions was to make sure "Set all segments" was on. With the new version, this is no longer working.
Running on EE 2.5.5
Replies
Steve 29 Mar 2013 18:36
A few more details of the issue:
- it looks like it's not working specifically when you're displaying entries from the primary site onto the secondary site, meaning it's not recognizing the categories listed in the primary site.
My situation:
I have two channels, one for projects, the other for media types. The projects are being pulled in from the primary to the secondary site. Media types is a channel on the secondary site. Filtering by media types works just fine, however the projects aren't filtering as
category="{segment_x_category_id}"
is basicallycategory=""
in the channel entries tag.Low 30 Mar 2013 08:56
Low Seg2Cat has always been like this. Guess "MSM-compatible" is a relative term, as the add-on will limit the search for category matches to the current site, avoiding name clashes as much as possible.
You can turn it off yourself by commenting out line 448 in ext.low_seg2cat.php: https://github.com/lodewijk/low.seg2c...
That way, it will match categories for all sites.
Steve 30 Mar 2013 14:59
Thanks for the info, however it doesn't seem to be working. I do see where I updated it in the previous version of Seg2Cat, but changing the line in version 2.7 doesn't seem to affect the filtering like it did before.
$this->EE->db->select('cat_url_title, '. implode(', ', array_keys($this->fields)))
->from('categories')
//->where('site_id', $this->site_id)
->where_in('cat_url_title', $segment_array);
Low 30 Mar 2013 16:07
Are you sure? Try clearing the cache and try again. I got it working on a MSM site in a test.
Steve 30 Mar 2013 16:29
Cleared cache to no effect. Here's my portfolio where the filtering is working:
http://www.stevegarcia.net/portfolio/web
and my business site where it isn't working:
http://www.620studio.com/portfolio/web
I can give you site access if that will help.
Low 30 Mar 2013 16:36
Sure, send me FTP and SuperAdmin login credentials to hi at gotolow dot com.
Toby Callinan 8 Jul 2013 13:48
Hello Mr low,
I am trying to get this to work also. I have been search around and found that the line numbers have naturally been changing as the versions have been.
I'm on V.2.8.0
Would you mind letting me know what line to comment out?
I've been searching the code for 'site' and can't seem to figure out what line I need to comment.
Many thanks
Low 8 Jul 2013 13:50
It's this one.
Toby Callinan 8 Jul 2013 13:53
Utter legend. Thank you so much.