January 15, 2020 at 6:20 pm #1174633
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.
NautrinoJanuary 16, 2020 at 10:10 am #1174814
Sorry for the problem. Could you please provide us with details to a site where we can see and reproduce the problem?
RikardJanuary 16, 2020 at 1:37 pm #1174934January 16, 2020 at 2:11 pm #1174962January 16, 2020 at 2:33 pm #1174989January 16, 2020 at 2:34 pm #1174992
We have just reported the issue to our devs and shared this thread as reference. Please kindly wait to hear from us :)
YigitJanuary 16, 2020 at 3:03 pm #1175024
And by the way – the link of a column goes to a new window – not a new tab- if it is set to blankJanuary 16, 2020 at 3:12 pm #1175026
@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?
YigitJanuary 16, 2020 at 3:50 pm #1175055
Yes 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 $linktargetit will open the way i like to have.January 16, 2020 at 4:06 pm #1175068
Thanks a lot for posting the solution @guenni007! We are going to be including the fix in upcoming version :)
YigitJanuary 16, 2020 at 4:09 pm #1175072
On 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 #1175075
there 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 !
January 16, 2020 at 6:01 pm #1175146
- This reply was modified 9 months, 1 week ago by 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 #1175214
No 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 #1175638January 19, 2020 at 9:27 am #1175968
Link “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 #1176236
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 220.127.116.11 (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.
GünterJanuary 21, 2020 at 10:18 am #1176629
thanks – 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 #1176688
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.
GünterJanuary 21, 2020 at 3:04 pm #1176761
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 firefoxJanuary 21, 2020 at 4:42 pm #1176824
Interesting – in buttons we have
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;
GünterJanuary 21, 2020 at 6:45 pm #1176893January 21, 2020 at 6:49 pm #1176895January 21, 2020 at 6:56 pm #1176898
Thanks – guess it can be closed because with 4.7.2 the issue is solved. And new window will be solved next Update ! :yooJanuary 21, 2020 at 7:42 pm #1176914
The topic ‘issue: button not linking to _blank target since 4.7.1’ is closed to new replies.