• Resolved larnoult

    (@larnoult)


    Hello,

    I’m using Ultimate Table of Content to organize pages within my French written website. For exemple https://www.parlemonde.org/nos-actions/
    Unfortunately, whenever there are acute or any type of special accent (é, è, ù, à…) the anchor link is not working. I guess filtering these characters would fix the issue!
    Hope you’ll release an update about it!
    Thanks,
    Cheers,

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Imtiaz Rayhan

    (@imtiazrayhan)

    Hi @larnoult ,

    Thanks for letting us know.

    We will work on it and hopefully come up with a solution as soon as possible.

    Regards.

    Plugin Author Imtiaz Rayhan

    (@imtiazrayhan)

    Hi @larnoult ,

    We have just released an update which comes with a fix for this. You can now use acute or any type of special accent. The anchor links will work.

    Please update the plugin to the latest version.

    Also, please remember to clear the cache after the update.

    Thanks for your patience.

    Regards.

    Thread Starter larnoult

    (@larnoult)

    Hello,

    Just upgraded your plugin and unfortunately, the problem remains. See this page for exemple:https://www.parlemonde.org/nos-actions/
    Thanks for letting me know it the issue is only on my side!
    Here is the error in the console

    jquery.js?ver=1.12.4-wp:2 Uncaught Error: Syntax error, unrecognized expression: #2-nos-b%C3%A9n%C3%A9ficiaires
        at Function.ea.error (jquery.js?ver=1.12.4-wp:2)
        at ea.tokenize (jquery.js?ver=1.12.4-wp:2)
        at ea.select (jquery.js?ver=1.12.4-wp:2)
        at Function.ea (jquery.js?ver=1.12.4-wp:2)
        at Function.a.find (jquery-migrate.min.js?ver=1.4.1:2)
        at n.fn.init.find (jquery.js?ver=1.12.4-wp:2)
        at n.fn.init.a.fn.find (jquery-migrate.min.js?ver=1.4.1:2)
        at a.fn.init.n.fn.init (jquery.js?ver=1.12.4-wp:2)
        at new a.fn.init (jquery-migrate.min.js?ver=1.4.1:2)
        at n (jquery.js?ver=1.12.4-wp:2)
    ea.error	@	jquery.js?ver=1.12.4-wp:2
    ea.tokenize	@	jquery.js?ver=1.12.4-wp:2
    ea.select	@	jquery.js?ver=1.12.4-wp:2
    ea	@	jquery.js?ver=1.12.4-wp:2
    a.find	@	jquery-migrate.min.js?ver=1.4.1:2
    find	@	jquery.js?ver=1.12.4-wp:2
    a.fn.find	@	jquery-migrate.min.js?ver=1.4.1:2
    n.fn.init	@	jquery.js?ver=1.12.4-wp:2
    a.fn.init	@	jquery-migrate.min.js?ver=1.4.1:2
    n	@	jquery.js?ver=1.12.4-wp:2
    (anonymous)	@	front-network-script.js?ver=5.2.3:17
    dispatch	@	jquery.js?ver=1.12.4-wp:3
    r.handle	@	jquery.js?ver=1.12.4-wp:3
    Plugin Contributor Alexis Pandaan

    (@alexius08)

    Hi @larnoult !

    Have you tried resaving the page? The heading IDs needed to generate the anchor links still use accented characters, and a resave would force the regeneration of the IDs.

    You can also try deleting and reinserting the Table of Contents block in the page just in case the above approach doesn’t work.

    Thread Starter larnoult

    (@larnoult)

    Hey @alexius08,

    Thanks for the tips! I tried both: unfortunately, still the same issue (see https://www.parlemonde.org/ for exemple).
    Cheers,

    Plugin Author Imtiaz Rayhan

    (@imtiazrayhan)

    Hi @larnoult ,

    We believe the error is coming from another script. Because we didn’t use any jQuery in our code.

    But we are looking into a fix from our side.

    Regards.

    Thread Starter larnoult

    (@larnoult)

    Hey,
    I figured the issue. I added that code to enable smooth scrolling:

    jQuery(function( $ ){
    	// Smooth scrolling when clicking on a hash link
    	$('a[href^="#"]').on('click',function (e) {
    		e.preventDefault();
    
    		var target = this.hash;
    		var $target = $(target);
    
    		if ( $(window).width() > 1023 ) {
    			var $scrollTop = $target.offset().top-30;
    		} else {
    			var $scrollTop = $target.offset().top;
    		}
    
    		$('html, body').stop().animate({
    			'scrollTop': $scrollTop
    		}, 900, 'swing');
    	});
    
    });

    I guess something is wrong with the selector a[href^=”#”]?
    Any lead?
    Cheers,

    Plugin Author Imtiaz Rayhan

    (@imtiazrayhan)

    We have smooth scrolling in the Table of Contents block. You can enable it when you insert the block.

    Try removing this code and using the smooth scroll that comes with our block.

    See if that works for you.

    Regards.

    Thread Starter larnoult

    (@larnoult)

    Thanks for the reply. I unfortunately cannot turn on this toggle (it’s blocked in the off position). Anyway, this plugin made the trick, despite the acute characters: Page scroll to id.
    Cheers,

    Plugin Author Imtiaz Rayhan

    (@imtiazrayhan)

    Glad to hear that, cheers.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Table of content issue with french accent (acute, ..)’ is closed to new replies.