ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Weblog search:field parameter not working correctly in Multiple Site Manager (EE 1.6.8, MSM 1.1)

November 16, 2009 12:26am

Subscribe [2]
  • #1 / Nov 16, 2009 12:26am

    jayf

    41 posts

    I need to filter an exp:weblog:entries set, and the search:field parameter works fine for what I need. The issue is that the template behaves differently across sites (using Multiple Site Manager). It works correctly on the site where the weblog and template live (site1), but the search filter does not work from other site (site2).

    Here’s the opening tag:

    {exp:weblog:entries 
    site="site1" 
    weblog="weblog1" 
    disable="member_data|trackbacks|pagination" dynamic="off"
    show_future_entries="yes" start_on="{current_time format='%Y-%m-%d %H:%i'}"
    sort="asc"
    search:people="Person1"}

    This works as expected in a template on the “site1” site. This is referenced on site1 like:

    {embed="group/.template"}

    But, on a “site2” site, while everything else works fine, the search:people filter is not applied. This template is referenced on site2 like:

    {embed="site1:group/.template"}

    Note that this is on EE 1.6.8 Build: 20090723 with MSM version: 1.1 Build: 20081024.

    If I’m doing everything correctly with the syntax, my guess is that there is maybe a parse complication in EE on the search:field—the parser doesn’t account for the site parameter and so can’t find the field.

    Any help much appreciated—thanks!

  • #2 / Nov 16, 2009 1:49am

    John Henry Donovan

    12339 posts

    jayf,

    Can you explain a bit more about what you are trying to do so i can try and recreate it?
    Where is the embed located?
    What does your URL look like?
    Do you get blank results on site2 or something different?

    This is referenced on site1 like:

    When you say this, you mean the whole template is and not just the opening weblog:entries tag?

  • #3 / Nov 16, 2009 2:02am

    jayf

    41 posts

    John, I had a typo in my original post, that I’ve corrected - site2 is embedding a template from site1. More description:

    The field I am searching has three values: Person1, Person2 and Person3. So, when I use search:people=“Person1” in the exp:weblog:entries tag, I expect the resulting list to NOT have any Person2 or Person3 entries. This works as expected on Site1.

    On Site1:

    http://site1/group/page1 shows me the list of entries as I expect, with results filtered on search:people=“Person1” (e.g., NO listings with people=Person2 are visible).

    This URL (site1/group/page1) embeds a template that contains the exp:weblog:entries tag (shown in my original post):

    {embed="group/.template"}


    On Site 2:

    http://site2/group2/page2 shows me a list of entries WITHOUT the filter applied (e.g., there ARE listings with people=Person2 visible). This URL (site2/group2/page2) also embeds the same site1/group/.template, as:

    {embed="site1:group/.template"}

    Everything about the embedded template works as expected, except the search filter.

    Also, I looked at the SQL queries via the debug output, and the relevant SQL LIKE clause that’s there when the tag is parsed on the template at the site1 URL is absent when the same tag is parsed on the template at the site2 URL.

    Hope that’s more clear—thanks!

  • #4 / Nov 16, 2009 2:16am

    John Henry Donovan

    12339 posts

    jayf,

    Thanks for the explanation. I did a bit more research. Take a look at this thread.

    I believe it is a limitation for that particular parameter.

  • #5 / Nov 16, 2009 2:44am

    jayf

    41 posts

    Thanks John - I was not able to find that thread before, so like the original poster in that thread, I also wasted too much time on this issue today.

    I would really appreciate it if notes about this limitation could be added very quickly to the EE documentation on both the Multiple Site Manager Variables and Parameter page (or, on a new, “Limitations with Multiple Site Manager” page) and also in the section for search://field_name= in Weblog Entries Tag Parameters.

    This is a limitation that looks a lot like a bug that is not super easy to reproduce and diagnose, from the point of view of being a creator of EE sites. It also doesn’t seem to be widely discussed on the forums or elsewhere, so it’s a somewhat obscure limitation—which makes it all the more frustrating to find out that it’s a “known limitation” that I didn’t know about!

    (Also, this issue is a crack in the selling-point that MSM lets you use the same weblogs across multiple sites. The MSM documentation currently says that the site=”” parameter works on Weblog Module: Every single tag, and this statement, without any qualification, creates a misconception about what’s really possible with MSM.)

    So, frustrations about everything aside, I can live with this as a Known Limitation, now that I know that it is a limitation. But, as long as it is a limitation, (EllisLab) PLEASE communicate about this by publishing a couple notes in the obvious places in the documentation.

    Thanks again, John!

  • #6 / Nov 16, 2009 2:59am

    John Henry Donovan

    12339 posts

    jayf,

    Sorry for your frustration and time spent. I will make a note internally to revisit the docs regarding this. Feel free to start a new thread if you have any more questions.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases