• Resolved jcbsep

    (@jcbsep)


    Hi guys

    My doubt is an easy one, I hope you can help me!

    If you access the link I shared with you: https://learnertrip.com/biology/plant-cell-organelles/#related you will see the problem right away.

    Before, when you clicked on the title or the “continue reading” it opened the post. Now it doesn’t, clicks don’t work anywhere on the box. I need to rightclick and open in a new tab.

    Do you know why is not working now?

    I have the same problems in other websites.

    Thanks in advance!

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

Viewing 15 replies - 1 through 15 (of 15 total)
  • Your ‘related posts’ module is linking to the post itself instead of a different post so the browser won’t reopen the same page unless you tell it to reopen it in a new tab or window.

    This is probably an indication of whatever is pointing at related posts is not working as expected. I guess it might be because there are no other ‘related’ posts, possibly.

    I think this is the plugin you are using…

    https://www.ads-software.com/plugins/wordpress-23-related-posts-plugin/

    That plugin is right dated so you might need to replace it with a different plugin.

    Thread Starter jcbsep

    (@jcbsep)

    1) That post is pointing to another post. If you rightclick it and open it in a new tab, you will see it’s a different post.

    2) It doesn’t have relation to related post plugins, that box it’s a default wordpress option when you drop a wordpress link in a post (using the visual editor)

    3) I use different related plugins in other websites and those wordpress links are not working either.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    It seems to be a function of the block being an iframe created by the embed, but I haven’t yet googled my way through to figuring out how the links are blocked from going anywhere.

    The iframe is sandboxed/security restricted, so it is not allowed to navigate the parent/top frame.

    The attribute on the iframe that I can see is sandbox="allow-scripts", which is probably the cause for this.

    Please refer to https://www.w3schools.com/tags/att_iframe_sandbox.asp

    The only box I saw under ‘related’ was a ‘box’ containing’ a link to that page itself and some text so I thought that was what you were referring to.

    On a subsequent visit, after a refresh, there was a different link there.

    And that didn’t work either so I’ll defer to @valentinbora and his answer which is probably the gist of the actual problem.

    Thread Starter jcbsep

    (@jcbsep)

    @valentinbora Can I do something about it to make it work as it used to?

    Could you please first try to disable CloudFlare Rocket Loader?

    This setting should be in your CloudFlare Dashboard -> Speed -> Optimization -> Rocket Loader

    If that doesn’t help, we’ll try something else.

    @jnashhawkins I’ve tested this on a vanilla installation and it works just fine, with the same sandboxing parameters. Upon further inspection, I see there’s a listener for link clicks that handles this via JS, so I am suspicious of CloudFlare’s optimizations that could break that JS.

    I’m seeing something that caused me to go off track there earlier with what I thought was ‘the box’ the OP was talking about.

    Anyway, the related links boxes down at the farther end of the article worked when I just clicked one of them but the box in section 3 which says ‘3. RELATED’ to me still doesn’t work though the link there is https://learnertrip.com/biology/animal-cell-organelles/ instead of https://learnertrip.com/biology/plant-cell-organelles/

    But now that I’m looking again https://learnertrip.com/biology/animal-cell-organelles/ and my browser has an extension added to disallow two windows or tabs open to the same link unless I manually intervene in that. I actually forgot I had that installed on this machine.

    This is getting more interesting by the moment… and the site is already an interesting site on its own.

    So Rocket Loader might be part of the problem… I’ve seen similar issues with Optimizers such as AutoOptimize when they clobber a bit of Javascript while removing extraneous carriage returns… or was it line feeds?

    Anyway, I look forward to ‘learning even more’ from this site!

    @jnashhawkins the listener I’ve mentioned is part of WP Core, in wp-embed.js and wp-embed-template.js. So they catch link clicks in the iframe and bubble it up to the parent frame via messaging, and then there’s the following that runs it:

    /* Only continue if link hostname matches iframe's hostname. */
    if ( targetURL.host === sourceURL.host ) {
    	if ( document.activeElement === source ) {
    		window.top.location.href = data.value;
    	}
    }

    That’s why I am suspicious of Cloudflare’s loader, although am not sure as I haven’t tested this specific scenario.

    Thread Starter jcbsep

    (@jcbsep)

    Thank you so much guys!

    1) @jnashhawkins I disabled Rocket Loader, purged cache and it didn’t fix it. :/

    2) The “link box” work on other websites under my server, with the same theme, but without Cloudflare, SSL and almost no plugins. Example here: https://www.celdranbanos.com/wordpress/wordpress-link-box-problem/

    Any other ideas?

    Thread Starter jcbsep

    (@jcbsep)

    (*) IMPORTANT INFO GUYS:

    If I go to a post and click on “Preview changes”, the iframe works.

    This is weird because the post in “preview changes” loads everything like in a published post, right?

    Thread Starter jcbsep

    (@jcbsep)

    Hi guys, I already fixed it.

    I installed a plugin called “Smush” (for lazy loading) and had deffered loads for iframes too. I just desactivated that option and everything is working as normal.

    Thanks for your help ??

    I looked at the source of the ‘test page’ and then looked at the ‘inspect’ text from the other (the problem) site.

    There are some subtle differences where that code to form the links differ but since the one renders in Spanish while the other renders in English contentwise I’m hitting several barriers to my own ability to dig deeper into this.

    My next suggestion would be to print out the source of the two pages on paper and do a side by side comparison. I can’t do that here as something in the production site won’t let me look at the raw text output except via Chrome’s ‘Inspect’ capability.

    Another thought is we are trying to do A – B comparisons where there are still differences in the actual two sites. Plugin lineup, a Javascript, maybe a difference in the genesis of the two themes, or maybe some bit of change crept in during setup that we can’t see from here.

    As I mentioned above. I can’t use CTRL-U to view the raw output of the problem site… I can see the raw output of the ‘test’ site…

    Subtle differences can hang things in amazing ways.

    Another suggestion might be to ask the theme author for help. His experience with his theme puts him way ahead of me and my ‘old eyes’ when it comes to finding those subtle differences I’m beginning to suspect.

    Do let us know if you find a solution as that info might help us help someone else or they may read this thread and that might lead them to a solution they need.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘WordPress box links don’t open’ is closed to new replies.