• Resolved meideserve

    (@meideserve)


    I’m using staging website to test before implementin the page id to scroll plugin.
    Am pretty happy with the plugin! – in fact, i have disabled my own custom self made plugin for smooth scrolling to install this! Basically I need 2 functions: (1) smooth scroll + (2) offset to avoid hidden from top menu, for all my anchor links in all scenarios:
    1. anchor links within same webpage
    2. anchor links from own webpage to another own webpage (same domain/website)
    3. link from external website/domain to my website. (ie. i put a link on facebook.com stating : https://staging9.meide.sg/window-cleaning/#2_Gloves – and it should go to the anchor link including smoothscroll and offset!

    My main problem is scenario 3 not working.
    after doing thorough research online, i find the plugin page scroll to id solves this problem!

    HOWEVER, it did not work for me because i realized when i click the link, it goes to my webpage and then the # anchor disappears. (i had enabled the checkbox in page scroll to id settings). and it does not scroll to the anchor. offset doesnt’ function also. I did torubleshooting and realized that when i disable my other plugin easy TOC, the problem is solved.

    However, i do require my easy toc plugin. So i enabled both easy toc and page scroll to id again. I played around with many different options, including changing settings in both easy toc and page scroll to id. However, the conflict still exists….
    no problems with easy toc functioning, but basically i cannot solve my problem for secnario 3 above!

    Just to reiterate – i did try to tick the checkbox for page scroll to id settings to force use it and to prevent JS conflicts with other plugins. But no matter what setting s i try ( i also unticked smooth scroll function in easy toc settings), the problem persists.

    Can I know how do I solve this conflict between page scroll to id AND easy toc? Basically both are essentail awesome plugins, and I think due to the importance of scenario 3 above – i cannot do without either one!

    Thank you!

    The page I need help with: [log in to see the link]

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

    (@malihu)

    Hello,

    I check your page and I see a js console error in 1 of your links. This error breaks plugins functionality for scenario #3.

    You have the link “10 TOOLS FOR WINDOW CLEANING” in your page which points to the target id What_Equipment_Do_I_Need_To_Clean_Windows?.
    The ? character is not valid for ids and it’ll cause issues. Try to remove it and make your target id:

    What_Equipment_Do_I_Need_To_Clean_Windows

    and link URL:

    #What_Equipment_Do_I_Need_To_Clean_Windows

    Let me know

    Thread Starter meideserve

    (@meideserve)

    Oh, regarding the Question mark – I am currently liaising with easy toc developer to resolve that.
    But that question mark is not applicable for the problem for scenario 3, because it links within the same webpage.
    Thanks for highlight it though!

    For scenario 3 – mainly it is due to the word “HERE” that links to another webpage – with #window.
    Look at the sentence:
    “Hence, cleaning companies would certainly have guidelines to follow regarding window cleaning. For example, learn about what meide.sg covers for window cleaning HERE.”
    The word here links to the other webpage with #window, but the problem can be seen there.
    Is that related to what you said “I see a js console error in 1 of your links. This error breaks plugins functionality for scenario #3.”?
    I’m not really sure what you mean by “js console error”.
    Hope to hear from u soon!

    many thanks for your reply!

    Plugin Author malihu

    (@malihu)

    No, the js error and the page not scrolling to https://staging9.meide.sg/window-cleaning/#2_Gloves is due to the question mark character.

    It is applicable for the scenario 3 problem. The script tries to parse all related links and the ? breaks the loop.

    Also, when you click the “10 TOOLS FOR WINDOW CLEANING” link with URL #What_Equipment_Do_I_Need_To_Clean_Windows?, it does not smooth scroll the page. The link will work properly (i.e. scroll the page smoothly) only when you remove the ? character from the URL and the target.

    None of the other links have the ? and all work as expected. The only one that does not work is the “10 TOOLS FOR WINDOW CLEANING” with the question mark.

    Thread Starter meideserve

    (@meideserve)

    Hi Malihu, appreciate u pointing out those errors. However, that is not the reason why I raise this topic!

    If you read again, the main, and BIGGER problem I have, is this… did you try to do this?

    1. Look at the entire sentence β€œHence, cleaning companies would certainly have guidelines to follow regarding window cleaning. For example, learn about what meide.sg covers for window cleaning HERE.” on the webpage https://staging9.meide.sg/window-cleaning/

    2. Look at the supposed link destination for the word “Here”.

    3. Do you see that the link destination is supposed to go to: ” https://staging9.meide.sg/what/#window ” ?

    4. Click on the word “Here”… it should bring you to ” https://staging9.meide.sg/what/#window “, but it DOES NOT!!

    5. So that is the main reason and main problem here… may I know why there is this problem?

    • This reply was modified 5 years, 3 months ago by meideserve.
    • This reply was modified 5 years, 3 months ago by meideserve.
    Thread Starter meideserve

    (@meideserve)

    Ok Malihu, so I tried to do what you said – and to remove the question mark…
    Because what you said made sense – that the punctuation broke the JS loop.
    Well, now the problem is not there…. but it only temporarily solve it!

    Really appreciate your help and advice!
    However, moving on, I belive page scroll to ID is a great plugin! And just like the easy TOC plugin… could there be an update to help resolve this punctuation problem more systemically? (instead of going to each individual posts, out of so many posts, to manually remove punctuation)?

    Like many other avid bloggers and busineses, actually, quite number of my headings (eg heading 2, heading 3), use punctuation for good reading!
    Blog readers like to see exclamation marks, or comma sometimes.

    However, as u saw for yourself, your plugin does not work when any headings contain punctuations.
    I actually raised a similar issue before to easy TOC and they resolved the issue with an update:
    https://wordpress.org/support/topic/not-working-with-punctuation/#post-13971438

    hope to hear from you and once again many thanks to helping us to move forward to solving this tiny but important issue, to allow all users of the plugin to like it even more! πŸ˜€

    Plugin Author malihu

    (@malihu)

    Thanks for the feedback!

    Of course you should have punctuation in your headings. The issue is about EASY-TOC script generating id attributes from those headings, without escaping or replacing these special characters.
    Special characters like ?, % etc. cause issues with jQuery selectors (imo EASY-TOC should escape these characters when generating the ids).

    This said, I’ll try to push an update for the plugin to deal with such characters (later today or tomorrow). I’ll post an update here when it’s ready.

    Thread Starter meideserve

    (@meideserve)

    Wow, I am happy to hear that Malihu. Am really glad you have a great sense of understanding for the community here, using WP and your plugin! Cannot wait to have this roundabout to enabling full functionality even with the punctuation in headings!

    I would definitely update to this.

    That said, to also assist, I also raised this issue to easy TOC. I’m not sure if that helps the situation? Would there be a chance whereby they decide to provide an plugin update too, to escape or replace the special characters, simultaneously when you are updating your side, therefore resulting in another clash/conflict between the two?

    If there is this possibility, I’d be glad to try and help communicate something (?anything) to prevent this. πŸ™‚

    Thread Starter meideserve

    (@meideserve)

    Hey Malihu! I think this case is resolved 100%.
    easy TOC has adjusted their script.

    You can see the discussion here:
    https://wordpress.org/support/topic/not-working-with-punctuation/

    • This reply was modified 5 years, 3 months ago by meideserve.
    Plugin Author malihu

    (@malihu)

    Update: I’ve pushed a fix for this issue in plugin’s development version, so if you want, you can download, replace current version (1.7.2) and check it.
    This fix will be part of the upcoming version 1.7.3. You can safely use plugin’s development version and update normally when version 1.7.3 is released πŸ˜‰

    Marking this as resolved.

    Thread Starter meideserve

    (@meideserve)

    yes yes! case solved, finally. many thanks for your awesome support!!! cheerios!

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

The topic ‘CONFLICT WITH EASY TOC’ is closed to new replies.