Tagged: _blank, button, new window, open
-
AuthorPosts
-
January 15, 2020 at 6:20 pm #1174633
Hi,
after updating to 4.7.1 (WP 5.3.2) buttons do not link to an external window (_blank) even it is chosen in the menu.: button settings, advanced, link settings, open in new window.Shortcode is not working, too.
Regards,
NautrinoJanuary 16, 2020 at 10:10 am #1174814Hey Nautrino,
Sorry for the problem. Could you please provide us with details to a site where we can see and reproduce the problem?
Best regards,
RikardJanuary 16, 2020 at 1:37 pm #1174934Following, I have the same issue.
January 16, 2020 at 2:11 pm #1174962This reply has been marked as private.January 16, 2020 at 2:33 pm #1174989Same for me too!
January 16, 2020 at 2:34 pm #1174992Hi,
We have just reported the issue to our devs and shared this thread as reference. Please kindly wait to hear from us :)
Best regards,
YigitJanuary 16, 2020 at 3:03 pm #1175024And by the way – the link of a column goes to a new window – not a new tab- if it is set to blank
January 16, 2020 at 3:12 pm #1175026Hey!
@guenni007 i just tested adding a link to a column element and opening it in a new window but that worked fine on my local installation. Is it not working for you?Best regards,
YigitJanuary 16, 2020 at 3:50 pm #1175055Yes in a new window ! that is not the way it should work! If i setup my browser to open in a new tab if target is blank !!!
i guess it is a “orthographic” error ;) ( take buttons.php and look _ there will be for link target the id: link_target – all other alb elements where the link is set correct with target blank have id: linktarget )
if i replace in the source code of buttons.php all and id too to linktarget$link_target with $linktarget
it will open the way i like to have.January 16, 2020 at 4:06 pm #1175068Hey,
Thanks a lot for posting the solution @guenni007! We are going to be including the fix in upcoming version :)
Regards,
YigitJanuary 16, 2020 at 4:09 pm #1175072On Columns you had to look in a different way. This is via data-link-column-target and based on script (shortcodes.js)
But i realy do not know why.
If i change it in headings.php the same thing – then it works but …January 16, 2020 at 4:11 pm #1175075there must be a different inconsitency there are alb elements where the link_target ID works as expected !!!
slideshow buttons for example ( or logoslider ) – there is in av-helper-slideshow.php the usage of ID : link_target and the buttons goes correctly to target blank if set !
the change now works on : buttons (all: buttons-row fullwidth-button) / icon-grid / headings / image_hotspots / promobox / timeline / accordion-slider / easy-slider.
on image the ID : target is used and it works !- This reply was modified 4 years, 10 months ago by Guenni007.
January 16, 2020 at 6:01 pm #1175146Hi Guenni007,
thanks for sharing your solution. I am not really getting it what to do now? Could you maybe post the new button.php code in the forum?January 16, 2020 at 11:21 pm #1175214No that is just for info to the mods – because as i said on top: there must be a different inconsitency.
Some ALB elements run with the other link_target ID. This is something for the other “Günter”
SorryJanuary 17, 2020 at 8:45 pm #1175638Thank you Günther, great tip!
January 19, 2020 at 9:27 am #1175968Link “In neuem Fenster öffnen” aus Button in einer Tabelle funktioniert nicht mehr seit Version 4.7.1.
Bitte dringend fixen!January 20, 2020 at 11:39 am #1176236Hi,
Sorry for this.
Rewriting the link selection for the toggles and moving the code to a template for easier maintenance I missed, that for some elements linktarget was used as id and for others link_target.
Already existing pages still work as expected, only new created elements or after saving an existing element the linktarget _blank might be broken.
This will be fixed in the oncoming release 4.7.1.1 (planned for this afternoon).
In case you created new elements or saved existing ones there is a fallback included to ensure that these elements will work.
Best regards,
GünterJanuary 21, 2020 at 10:18 am #1176629thanks – seems to work as expected now in 4.7.2
except – link from column with target blank goes to new window on firefox and safari (on chrome it is ok).
maybe that is due to data-link-column-target ? and concerning script (in shortcodes.js 618ff) But i guess that this is the fact for a lot of older enfold versions too. Even if i go back to the shortcodes.js version without allow smoothscroll feature the links opens in new windows.PS: On image.php the id is only target – it works! but maybe it will be nice to have same IDs in source code for same behavior.
January 21, 2020 at 12:49 pm #1176688Hi,
This is caused by ‘noopener noreferrer’ see enfold\js\shortcodes.js 642:
window.open( url, '_blank', 'noopener noreferrer' );
Seems to be for security reasons that FF opens a new window and not a new tab. If you remove ‘noopener noreferrer’ it opens in a new tab.
Best regards,
GünterJanuary 21, 2020 at 3:04 pm #1176761Thanks –
but why the other links ( from images, buttons, etc. pp ) got : nofollow noreferrer – and it works with new tab even on firefox
and the column links got : noopener noreferrer – and that does not work in new tab – just goes to new window ?could this be an alternative for line 642:
window.open( url, '_blank').opener = null;
that will open in new tab even on firefox
January 21, 2020 at 4:42 pm #1176824Hi,
Interesting – in buttons we have
<a>
links.
I think I found a better solution – replace 642 with:
var a = document.createElement('a'); a.href = url; a.target = '_blank'; a.rel = 'noopener noreferrer'; a.click(); return false;
Best regards,
GünterJanuary 21, 2020 at 6:45 pm #1176893Yes – works too : will it be included in next update?
January 21, 2020 at 6:49 pm #1176895January 21, 2020 at 6:56 pm #1176898Thanks – guess it can be closed because with 4.7.2 the issue is solved. And new window will be solved next Update ! :yoo
January 21, 2020 at 7:42 pm #1176914 -
AuthorPosts
- The topic ‘issue: button not linking to _blank target since 4.7.1’ is closed to new replies.