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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    This appears to be a problem that is caused by your theme loading an extra copy of the jQuery JS library. Please see https://tablepress.org/faq/js-functions-not-working/ for some ideas to fix this.

    Regards,
    Tobias

    Thread Starter NYG8OR

    (@nyg8or)

    Thanks for the quick reply.

    I have confirmed that it is related to the Use Data Tables functionality because if I deselect that option, everything works fine.

    Do you have any suggestions on how to fix without changing php files as I think that is a bit over my head and I am afraid of what amending those files will do to the rest of my site?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    it’s indeed related to that checkbox, as that results in TablePress/WordPress loading a DataTables JavaScript file as well as the jQuery JavaScript library.

    Unfortunately, your theme contains a bug where they also load that jQuery library, but an old and outdated version – instead of relying on the version that comes with WordPress. This is what needs to be fixed. Everything else would just hide the problem so that it most certainly will come back in the future.

    If you don’t want to modify the PHP files yourself, I suggest to contact the theme developers about this. They should not be loading their own version of jQuery. Alternatively, you could look for a new theme. A short-term workaround would be to uncheck that “Use DataTables” checkbox, which however will turn off those table features.

    Regards,
    Tobias

    Thread Starter NYG8OR

    (@nyg8or)

    I now seem to be in a catch 22 as I have learned how to modify the php files but…

    -when I delete the wp deregister line the sorting and pagination hat I want from the plug in does not work even when the plug in is set up for it

    – when I delete the register line, other jave functionality of the site no longer works, for instance a To Top button on each page

    Additionally, while this fixes the sub menus appearing, the formatting is all messed up so that while I can see the sub menus, I can not click on them because they disappear before I can get to them.

    So it appears solving the sub menu disappearing issue will simply create other issues.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    can you please post the exact lines that you found and removed/changed?

    Regards,
    Tobias

    Thread Starter NYG8OR

    (@nyg8or)

    Within functions.php these are what I have been playing with

    wp_deregister_script( ‘jquery’ );
    wp_register_script( ‘jquery’, ‘https://code.jquery.com/jquery-1.7.min.js’, false, ‘1.7’, true);
    wp_enqueue_script( ‘jquery’ );

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    nice find, thanks! From those three lines, please remove the first two,

    wp_deregister_script( 'jquery' );
    wp_register_script( 'jquery', 'https://code.jquery.com/jquery-1.7.min.js', false, '1.7', true);

    The third line

    wp_enqueue_script( 'jquery' );

    must be left in place.

    Can you please try that?

    Regards,
    Tobias

    Thread Starter NYG8OR

    (@nyg8or)

    When I do that, the pagination and java functionality of the tables is lost. I can see the sub menus but am unable to click on them because they disappear when moving to them.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    can you please do it again (and clear all caches) so that I can check again? Maybe after this, there will be error messages now that help us.

    Regards,
    Tobias

    Thread Starter NYG8OR

    (@nyg8or)

    It is now updated in functions.php as wellas with Data Tables Javascript enabled. You can see what I mean with the sub menus and table java script. But I do not know how to clear the cache of the site.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks! I can indeed see more error messages now. Those are also related to your theme, from what I can see, so that does not seem to be coded in the best way, unfortunately :-/

    The first problem is this line, presumably in the theme’s “footer.php”:

    <script type="text/javascript"> $(".chzn-select").chosen(); </script>

    It needs to be changed to

    <script type="text/javascript"> jQuery(".chzn-select").chosen(); </script>

    Then, in the JS file https://collegefootballquest.com/wp-content/themes/reaction/assets/javascripts/filterable.pack.js
    the last line has to be changed from

    [$(this).attr('href')]);$(settings.tagSelector).removeClass('current');$(this).addClass('current')})}})}})(jQuery);$(document).ready(function(){$('#portfolio-list').filterable()});

    to

    [$(this).attr('href')]);$(settings.tagSelector).removeClass('current');$(this).addClass('current')})}})}})(jQuery);jQuery(document).ready(function(){$('#portfolio-list').filterable()});

    Can you please try that?

    We are basically fixing coding errors now that happen because the theme developer wasn’t using the correct version of jQuery from the beginning. With this wrong behavior, the theme would not be permitted in the official WordPress theme repository, if it were submitted now, by the way.

    Regards,
    Tobias

    Thread Starter NYG8OR

    (@nyg8or)

    I have tried that with same result.

    When I began down this rabbit hole I found out that the Theme is no longer supported so I figured once you told about the Java conflict that it was theme related and that would be a dead end.

    I have been reading up on switching themes but it sounds like a major issue where a lot will go wrong and I will need to reconstruct a lot of the site, so I am trying to patch as is, if possible.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    switching themes should not be that problematic, unless you have made other customizations or use special features that other themes don’t offer.

    With a proper backup, it’s definitely worth a try, given that you’ll probably run into more issues down the road, with a theme that is no longer supported.

    Now, from what I can, you tried to comment out that line in

    /* <script type="text/javascript"> $(".chzn-select").chosen(); </script> */

    That won’t work like this, as these are the wrong type of comment tags here. Please change that to

    <script type="text/javascript">/*  $(".chzn-select").chosen(); */</script>

    for proper commenting out (or delete that line entirely).

    In the change for that filterable.pack.js file, I unfortunately forget a $. Please modify the last line again, this time to

    [$(this).attr('href')]);$(settings.tagSelector).removeClass('current');$(this).addClass('current')})}})}})(jQuery);jQuery(document).ready(function($){$('#portfolio-list').filterable()});

    Regards,
    Tobias

    Thread Starter NYG8OR

    (@nyg8or)

    I have made the changes but it does not look like anything has changed.

    Yes I will probably look into the Theme things when I have some time. If you know of any themes similar to this one that you are happy with, I am open to recommendations as I am not really sure where to begin a theme search since I hired someone to build this site initially and have been learning WordPress as I go after it was built.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    oh, things are changing, I’m getting a new error message now, so we are making progress. ?? Now it looks like the JS file https://collegefootballquest.com/wp-content/themes/reaction/assets/javascripts/skeleton-key.js is using invalid jQuery selectors, so that file will have to be edited next. In that file, please do a search and replace and replace all occurrences of

    $("#.

    with

    $("#

    (i.e. remove the.). There should be 19 of them.

    Unfortunately, I can’t really help with a new theme, as that’s not my area of expertise, sorry ??

    Regards,
    Tobias

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Sub Item Menu Items Problem on Pages with TablePress’ is closed to new replies.