• Resolved LindaEve

    (@lindaeve)


    Hi Again Tobias!

    I am having a prob with filtering multiple words. I need to display a table in two different ways –
    1. display ony rows that contain spatmap and swtl
    2. display only rows that contain spatmap and dbse

    Accordingly, I use the following shortcode:

    [table id=16 filter="spatmap&&swtl" automatic_url_conversion=true /]

    [table id=16 filter="spatmap&&dbse" automatic_url_conversion=true /]

    The result is no rows appear. I tried a couple of variations – added quotes around each word:

    [table id=16 filter="spatmap"&&"swtl" automatic_url_conversion=true /]

    [table id=16 filter="spatmap"&&"dbse" automatic_url_conversion=true /]

    resulting in the entire table appearing in both cases, unfiltered.

    Then I tried adding spaces before and after the &&:

    [table id=16 filter="spatmap" && "swtl" automatic_url_conversion=true /]

    [table id=16 filter="spatmap" && "dbse" automatic_url_conversion=true /]

    and this resulted in both tables filtering identically (filtering on the first but not the second word).

    Am I missing something? Filtering on one word only is working great! This is the first time I am trying to filter on 2 words and it is simply not working.

    Thanks!
    Linda

    http://wordpress.org/extend/plugins/tablepress/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi Linda,

    the correct Shortcodes are

    [table id=16 filter="spatmap&&swtl" automatic_url_conversion=true /]
    
    [table id=16 filter="spatmap&&dbse" automatic_url_conversion=true /]

    Are you using the latest version of the Filtering Extension from http://tablepress.org/extensions/row-filter/ ?

    If you still can’t get it to work, can you please send me an email (the address is in the main plugin file “tablepress.php”), so that I can take a direct look at this in the admin area of your site and maybe run a few tests?

    Regards,
    Tobias

    Thread Starter LindaEve

    (@lindaeve)

    Tobias, you are so fast! Do you ever sleep? I actually found another thread (http://wordpress.org/support/topic/plugin-tablepress-table-disappears-when-filtering?replies=6) where you answered the same problem differently and that solution, which I just now tried, worked. I removed the && and replaced with just a space.

    I am in fact using the current version of row filtering (1.0).

    Not sure why, but your early solution worked. If that does not make sense to you, please let me know. If I use this everywhere, I may have a problem with later versions of the extension.

    Thanks!!
    Linda

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi Linda,

    yes, I do sleep. (I love sleeping 😉 ) I guess you are just lucky that the time zone difference is on your favor 🙂

    Replacing the && with a space will work whenever the two search terms stand in the same cell (and are separated by just a space). So from that point of view, it does make sense. I’m still not sure though, why the && did not work. I guess, I’ll have to investigate this some more.

    Regards,
    Tobias

    Thread Starter LindaEve

    (@lindaeve)

    They are in the same cell, separated by a space, but in some cases a comma and a space, so I guess I had better check to make sure those with commas are appearing! Thanks so much for your answers!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    if they are separated by a comma and a space, the modified Shortcodes (with space instead of &&) will not find that. Basically, a Shortcode like

    [table id=16 filter="spatmap swtl" /]

    will treat

    spatmap swtl

    as one word, and not two.
    The cell content

    spatmap, swtl

    does then not match that.

    I’ll hopefully get around reviewing the &&‘s in the Filtering Extension in the next few days. It might be a good idea if I examine this on your site, as we know that it’s not working there. Could you therefore please contact me via email, as described above? Thanks!

    Regards,
    Tobias

    Thread Starter LindaEve

    (@lindaeve)

    OK, I’ll contact you now.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks! I’ve already replied, and I think I have found the solution. 🙂

    In summary: When using the “Visual” editor in WP, the && got transformed to HTML entities, which are then not recognized by the Filtering Extension. So, pages with a Shortcode that uses the filter parameter should be edited in the “Text” editor only.

    Regards,
    Tobias

    Thread Starter LindaEve

    (@lindaeve)

    OMG, why did I not see this? Thanks so much Tobias, you are a hero at Rutgers University! I wish you worked here!!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! And don’t repeat that suggestion/wish or I’ll take you up on that! 😉

    Best wishes,
    Tobias

    Hi Tobias,

    I’m having a similar problem but I am editing my code only in the ‘text’ mode and still can’t get the logical && to work. Is there a setting I am missing?

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Can you please provide more details here, like the exact Shortcode you are using, and a link to the page with the unfiltered table? Thanks!

    Regards,
    Tobias

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘filter extension problem – cannot filter multiple words’ is closed to new replies.