Sommerregen / grav-plugin-external-links

This plugin adds small icons to external and mailto links, informing users the link will take them to a new site or open their email client.
Other
16 stars 14 forks source link

Works on first page displayed #5

Closed bdillahu closed 9 years ago

bdillahu commented 9 years ago

I've got one I can't figure out how to debug... plugin works great on the first page displayed (doesn't matter what it is, as nearly as I can tell), then when I click a link, the next page won't have links marked. If I go back to the first, the link marks are gone.

Any ideas what to look at?

www.craftacraft.com is the site, if looking at the public side would help

Thanks, Bruce

Sommerregen commented 9 years ago

Hi @bdillahu,

unfortunately I have no idea. Maybe this can be a modular page issue... Are you still using External Links on your site? It seems like you disabled it. Can you enable it again or provide me here with the version of Grav + plugin you are using plus a minimal working example showing the issue?

bdillahu commented 9 years ago

Just upgraded Grav to latest:

% bin/gpm version !7035 You are running Grav v0.9.40

External links reports latest:

It is enabled on craftacraft.com http://craftacraft.com/ -

Here’s the config file (maybe I have something wrong in there)?:

Global plugin configurations

enabled: true # Set to false to disable this plugin completely built_in_css: true # Use built-in CSS of the plugin weight: 0 # Set the weight (order of execution)

Default options for External Links configuration.

exclude: classes: [exclude] # Exclude all links with this class domains: # A list of domains to be excluded e.g

- localhost/* # (any RegExp can be used)

- img.domain.com/*

- store.craftacraft.com/*

- www.craftacraft.com/*

- craftacraft.com/*

Global and page specific configurations

process: true # Filter external links no_follow: true # Add rel="nofollow" to all external links target: "_blank" # Set target attribute of link

mode: "active" # active = process and parse all links;

passive = parse links, but don't set CSS classes

Bruce C. Dillahunty http://www.emptyworlds.com

On Sep 3, 2015, at 2:09 PM, Benny notifications@github.com wrote:

Hi @bdillahu https://github.com/bdillahu,

unfortunately I have no idea. Maybe this can be a modular page issue... Are you still using External Links on your site? It seems like you disabled it. Can you enable it again or provide me here with the version of Grav + plugin you are using plus a minimal working example showing the issue?

— Reply to this email directly or view it on GitHub https://github.com/Sommerregen/grav-plugin-external-links/issues/5#issuecomment-137531165.

Sommerregen commented 9 years ago

Dear @bdillahu ,

thanks. I inspected your website and it seems, that External Links is indead active, for example a link on your site looks like this

<a class="external-link no-image" data-title="This link will take you to an external web site. We are not responsible for their content." rel="nofollow" target="_blank" href="https://vimeo.com/channels/910955">video blog</a>

However, no stylesheet is added to your pages! There are two possibilites left, either it is due to your customized theme or you have another config overriding the default values (located at user/config/plugins/external_links.yaml). In the first case you may try switching to Antimatter theme and test whether it now works, in the latter delete(or rename) your custom config, so that the original plugin configuration is loaded. You may try both and see the effects. Let me know your results.

bdillahu commented 9 years ago

Really weird one…

I tried both of your suggestions to no effect.

The first hit to the site after a cache clear works, regardless of theme or external_links.yaml file. Then you refresh the page, or go to another page on the site, and you’ll never see the link icons again.

Reeler the cache and that first hit will work again.

Of course on a production site, you have to be the next one to hit it (not that I get a lot of traffic, so not that hard to test).

I’ve tried to look and see if my ISP (Dreamhost) is doing anything with the caching, but I thought I had it all turned off/normal.

If you think of anything else to look at, let me know :-)

Appreciate the help!

Bruce

Bruce C. Dillahunty http://www.emptyworlds.com

On Sep 4, 2015, at 12:06 PM, Benny notifications@github.com wrote:

Dear @bdillahu https://github.com/bdillahu ,

thanks. I inspected your website and it seems, that External Links is indead active, for example a link on your site looks like this

video blog However, no stylesheet is added to your pages! There are two possibilites left, either it is due to your customized theme or you have another config overriding the default values (located at user/config/plugins/external_links.yaml). In the first case you may try switching to Antimatter theme and test whether it now works, in the latter delete(or rename) your custom config, so that the original plugin configuration is loaded. You may try both and see the effects. Let me know your results.

— Reply to this email directly or view it on GitHub https://github.com/Sommerregen/grav-plugin-external-links/issues/5#issuecomment-137778249.

Sommerregen commented 9 years ago

Ah, we're getting closer! :-) Just one try, because it seems like this is really a hidden bug I havn't foreseen. For testing purposes (you can use your custom theme and config, it doesn't matter) I'm curious to know what happens if you switch off caching permanently. I guess you will see the icons then.

bdillahu commented 9 years ago

Sure enough.. killing caching causes the icons to reappear and stay there.

I tried some combinations of the various options (TWIG/cache gzip compression, etc.) and didn’t find anything that seemed to make a difference.

Bruce

Bruce C. Dillahunty http://www.emptyworlds.com

On Sep 4, 2015, at 3:47 PM, Benny notifications@github.com wrote:

Ah, we're getting closer! :-) Just one try, because it seems like this is really a hidden bug I havn't foreseen. For testing purposes (you can use your custom theme and config, it doesn't matter) I'm curious to know what happens if you switch off caching permanently. I guess you will see the icons then.

— Reply to this email directly or view it on GitHub https://github.com/Sommerregen/grav-plugin-external-links/issues/5#issuecomment-137837010.

Sommerregen commented 9 years ago

Ok, thanks.Then I know the problem. It will be fixed in the next release. Thanks for digging in and finding the bug! :-)

bdillahu commented 9 years ago

Sure enough… seems to have fixed it :-)

Thanks so much for the help on this!

Bruce

Bruce C. Dillahunty http://www.emptyworlds.com

On Sep 9, 2015, at 12:51 PM, Benny notifications@github.com wrote:

Closed #5 https://github.com/Sommerregen/grav-plugin-external-links/issues/5 via 74005b3 https://github.com/Sommerregen/grav-plugin-external-links/commit/74005b318367939ed840f5e4a9adcf86116a52ca.

— Reply to this email directly or view it on GitHub https://github.com/Sommerregen/grav-plugin-external-links/issues/5#event-405047654.

Sommerregen commented 9 years ago

No problem! And thanks for digging in :-D