• Resolved doffine

    (@doffine)


    Hello @freemp,

    first of all thanks for your great plugin that switches off these author archive pages that should be unnecessary (and therefore unprofessional to be presented though) for a great number of WordPress websites.

    Now we found a problem with the important theme “Avada”.

    If we browse to /author/admin/ with your plugin activated the 404 is generated as expected, but there additionally is a jQuery error in the console and not every JS element in the main menu keeps working on this /author/admin/ page.

    The error:

    Uncaught Error: Syntax error, unrecognized expression: #/
        jQuery 9
        refresh https://[DOMAIN]/wp-content/themes/Avada/assets/min/js/library/bootstrap.scrollspy.js?ver=3.3.2:1
        jQuery 3
        refresh https://[DOMAIN]/wp-content/themes/Avada/assets/min/js/library/bootstrap.scrollspy.js?ver=3.3.2:1
        s https://[DOMAIN]/wp-content/themes/Avada/assets/min/js/library/bootstrap.scrollspy.js?ver=3.3.2:1
        e https://[DOMAIN]/wp-content/themes/Avada/assets/min/js/library/bootstrap.scrollspy.js?ver=3.3.2:1
        jQuery 2
        e https://[DOMAIN]/wp-content/themes/Avada/assets/min/js/library/bootstrap.scrollspy.js?ver=3.3.2:1
        <anonymous> https://[DOMAIN]/wp-content/themes/Avada/assets/min/js/general/avada-scrollspy.js?ver=7.7.1:1
        jQuery 13
            e
            t
            setTimeout handler*Deferred/then/l/<
            c
            fireWith
            fire
            c
            fireWith
            ready
            B
            EventListener.handleEvent*
            <anonymous>
            <anonymous>
    		
    jquery.min.js:2:13639

    As soon as we switch off your plugin the jQuery error in the console is gone.

    The error only occurs if we use “Layouts” in Avada (which is like in other themes a special Avada feature). We have many other Avada installations that don’t use layouts and there we don’t see the above problem with your plugin.

    Since Avada really is an important theme with many, many installations we thought you might want to look into this and make your plugin compatible with Avada layouts?

    Greetings and thanks for your work,
    -doffine

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author freemp

    (@freemp)

    Hi @doffine,

    one possible reason for the error might be that the hash character (#) the plugin returns instead of the author link, is used in a jQuery without either being wrapped in quotes or escaped by \\.

    A good starting point would be to check where your theme uses author links.

    Thread Starter doffine

    (@doffine)

    Hi @freemp,

    we just found that Avada is not the only thing causing this problem.

    We can leave Avada and your plugin activated and disable only WPML – then the jQuery error is gone, too.

    Or we can leave your plugin and WPML activated and replace Avada with Twenty Twenty-Two – then the error is also gone.

    But: We have other WP installations with both Avada and WPML that don’t show this error with your plugin. So it seems to be quite complicated. We really don’t know what the problem is and are not very confident that involving Avada or WPML support will solve this problem.

    So we deinstalled your plugin and replaced it with a manual 404 redirection of the author archive page.

    Anyway many thanks for your quick response. Perhaps at least it can be useful for you if you have heard of such problems when there should be future similar cases.

    Greetings and thanks for your work,
    -doffine

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘jQuery Error with Avada layouts for content’ is closed to new replies.