• Resolved cocopops67

    (@cocopops67)


    Hi again, I’ve spent quite a lot of time converting my Venue fields into linked hyperlinked fields. The rows are: Event – About -Date -Location -Category.

    The venues were added as normal text at first and the filter function worked fine, so people could filter events by venue.
    venue = ‘New Theatre’
    Now I have added them in enclosed html to link to my locations pages.
    venue = New Theatre

    The field in venue displays corrctly as ‘New Theatre’ but the filter doesn’t work. If I now select New Theatre (or any other venue) as a choice – no records are found.

    It seems as though the filter is set on the html code and not the field text?

    The table and non working Venue filter can be seen here as an example
    https://www.whatsoncardiff.net/family-fun-events-in-cardiff/

    Please don’t make me set them all back again ??

    thankyou

    https://www.ads-software.com/extend/plugins/tablepress/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble!

    If I understand correctly, you are talking about the Dropdown boxes above the table for the filtering, right?

    Then you are correct. The HTML links in that cause some trouble. The work around for this is to add a second “Venue” column which has the venue name without a link (so that you’ll have two “Venue” columns in the end, one with just the name and one with the name being a link).
    We can then hide the non-linked column from the visitor, but instruct the Dropdown filtering to use that column for the filtering (instead of the one with the links, which doesn’t work).
    (Yes, this would mean some more extra copy/paste work – unless, you happen to have a backup of the table before you converted the venues to links. I can then do this faster with some code.)

    Now, before we attack that, we’ll need to fix another problem first: As it seems, there’s something broken right now in the footer of the page with the table. When I view the page, the Dropdowns and the sorting don’t appear, as there’s something missing from the HTML code on the page. My assumption is that this happens because the memory limit is reached. Could you therefore please follow the instructions at https://codex.www.ads-software.com/Editing_wp-config.php#Increasing_memory_allocated_to_PHP to increase the PHP memory to say 256M?

    Regards,
    Tobias

    Thread Starter cocopops67

    (@cocopops67)

    Oh Lordy! I use Firefox all the time and it’s fine, Ive just checked and it’s also faulty like that in Opera,Chrome and IE . The memory is maxed out from an application I had running before. The webhost actually increased it to the max 512mb.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    then it’s probably fine in Firefox, because you are logged in into WordPress there, right? But you are not logged in, when viewing the site in the other browser?

    Now, if the memory is already at 512MB, the cause for this is likely something else. To find out what that is, it would be good if you could set the WP_DEBUG constant to true in the wp-config.php. That should show us an error message at the bottom of the page.

    Regards,
    Tobias

    Thread Starter cocopops67

    (@cocopops67)

    Hi I have set the Debug to on but no errors in the log file.
    I did read another post about a similar thing, as I am using this table in more than one area – there used to be a caching switch I presume that is no longer an option when you edit the table?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ok, I also don’t see an error message…
    That’s weird. Something is stopping the processing of the page there…
    In line 1170 of the HTML source, output just stops after <div class="widgetwrap"><div id="adrotate_widgets-2" class="widget widget_adrotate_widgets"><!--mfunc-->
    That seems to be an ad plugin’s widget. Could you maybe turn that of temporarily?

    Also, could you temporarily switch to the WordPress default theme TwentyTwelve, to see if the same issue happens there?

    And yes, TablePress does use caching for it’s tables, and while there’s no checkbox to turn it off anymore, you can turn it off for this table by extending the Shortcode to

    [table id=8 cache_table_output=false /]

    But I would be surprised if this changes something…

    Regards,
    Tobias

    Thread Starter cocopops67

    (@cocopops67)

    Hmmmm, I am using WP super Cache – and that seems to have been the problem, it also stopped the sliders from appearing. I have deleted the cache and turned it off. I will experiment with it over the next few days, but at the moment it is working again ?? The ads thing functions fine on the site in cnjunction with the tablepress.

    I think I have a solution to the filtering by URL’s and will try that.

    I will let you know if I find anything with supercache plugin,

    Thanks again.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yes, now everything works again for me as well ?? Good to hear that you found this!
    It might have been a temporary glitch, where the caching plugin cached an incomplete version of the page…

    Yes, if you find anything with the plugin, or have trouble with the filtering, just post here again.

    Regards,
    Tobias

    Thread Starter cocopops67

    (@cocopops67)

    Just a follow up, seems there are big conflicts with supercache with caching turned on. I have turned it off and working well. I shall post on the SC forum.

    Also a much worse performance in Internet Explorer 30 seconds to load compared to 10 seconds on some categories. I am using IE8 which probably doesnt help, but have noticed strange behaviour in a few of the categories. On my Charity category and some others , in IE8 the dropdowns on the filters read incorrectly –
    Firefox and others Dropdown Reads as it should = Venue & Date
    IE8 Dropdowns class=” szlr-firstchild”>Venue & class=” szlr-firstchild”>Date

    Verifying my theory that IE has and always will be ****

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    hhm, that’s weird. WP-Supercache is usually pretty reliable, so I’m not sure what’s causing this there…

    And yes, Internet Explorer is a PITA sometimes…

    Regards,
    Tobias

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ok, let’s continue the other problem, about the filters:

    The first step is what I described above: Please duplicate the Venue column in the table, so that one of the two has the Venues with links, and so that the other column has just the venue as text (without links, just as you had it initially).
    After you have finished this step, we’ll hide the column that has the venue without links, but still use that column for filtering.

    Regards,
    Tobias

    Thread Starter cocopops67

    (@cocopops67)

    Ok, thanks, as this is a live site I have created a testpage:
    mydomain/tespage This is a carbon copy of what I will be uploading minus a few hundred rows .All the ‘real’ tables are configured off the main table. I can replicate the instructions for the live table when I know what is happening ??

    So there is now two venue filters showing for table:
    Col 3) With Html Col6) With Plain text

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    very nice! Now, just move the columns next to each other (will make it easier to maintain them in the future), and add the column with the Venues as links to the exclude parameter in the Shortcode, so that that dropdown is hidden (just like you are hiding the dropdowns for Event and About right now).
    After that, we’ll just need to hide the column with the non-linked venues. There are two possibilities for this:
    The better one (but I don’t know if it works) is to add this to the “Custom Commands” textfield on the “Edit” screen of the table:

    "aoColumnDefs": [ { "bVisible": false, "aTargets": [ 3 ] } ]

    (assuming that you make the non-linked Venue column column 4 (counting starts with 0 here).
    The second possibility, if the first one does not work, is to hide the column with “Custom CSS”:

    .tablepress-id-3 .column-4 {
      display: none;
    }

    (Counting starts with 1 here.)

    Regards,
    Tobias

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Table Doesn't filter when hyperlinks are used as main fields’ is closed to new replies.