Line Break Tags Added to Scripts and Styles
Apologies if this has been covered. I did search.
I activated Gutenberg for a site that has been in existence for a while. That is, it already had existing posts and pages. It wasn't a brand new site.
I edited an existing Post that had an Amazon native search ad script at the bottom. After Updating, I viewed the post and noticed the ads were apparently missing.
The script code was still there, but a br tag had been added after each line. The script from Amazon was multi-line, broken after each semicolon.
I deleted the tags and all was fine. I then deactivated Gutenberg (for now).
Desktop (please complete the following information):
- OS: iOS Sierra 10.12.6 on Macbook Pro
- Browser Firefox
- Version 61.0.2
Additional context
- Gutenberg 3.5.0
Would you be able to provide a reference copy of the content of your post? I understand you might not be able to provide an exact copy because of the contents of your ad script, but something close we could test conversion from Classic Editor post to Gutenberg post would be greatโit would help us diagnose what is being converted incorrectly.
Here is what the script looks like with Gutenberg active following an edit to the Post:
I altered the tracking ID and linkid above. Let me know if the html does not come through in this email.
Gary
It does come through, but if you could paste an unedited-by-Gutenberg, before being edited by Gutenberg version of the content so we can try to convert it ourselves that'd be great.
If you paste the content via GitHub we can style the HTML a bit better, but email works too ๐
Thanks!
This is from the very end of the Post.
Before:
Overall, this is a good, solid, basic bipod, which is what the majority of users want. The price is in the midrange compared to other similar models.
Check the pricing and availability of the Sonicking Adjustable Rifle Bipod on Amazon today.
[helpful]
After:
Overall, this is a good, solid, basic bipod, which is what the majority of users want. The price is in the midrange compared to other similar models.
Check the pricing and availability of the Sonicking Adjustable Rifle Bipod on Amazon today.
[helpful]
Let me know if you need more.
Gary
On Thu, Aug 16, 2018 at 4:05 PM Matthew Riley MacPherson < [email protected]> wrote:
It does come through, but if you could paste an unedited-by-Gutenberg, before being edited by Gutenberg version of the content so we can try to convert it ourselves that'd be great.
If you paste the content via GitHub we can style the HTML a bit better, but email works too ๐
Thanks!
โ You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WordPress/gutenberg/issues/9056#issuecomment-413684644, or mute the thread https://github.com/notifications/unsubscribe-auth/AoeyeXeDJYYEWsMPa38u7hcn8ncBjN7lks5uRd6egaJpZM4WARet .
Any news on this issue? I'm having same problem. :(
No news as of yet: if there are any updates we will post them in the issue ๐
You can subscribe to any issue youโd like updates to on GitHub in the future, but rest assured when we know more weโll post here๐
This has happened to me as well, and I'm guessing that it also happened to every other Amazon associate that uses ad code within their posts. Even if you open an old post to edit it, it converts everything right away, adds br tags and breaks the ads.
I thought for sure this would have been fixed before 5.0 came out, but it hasn't. Not even by 5.0.2.
Come on, guys, this is a big one. Can we get it done in 5.0.3 or 5.1?
Gary
On Fri, Jan 4, 2019 at 3:47 AM shuttermuse [email protected] wrote:
This has happened to me as well, and I'm guessing that it also happened to every other Amazon associate that uses ad code within their posts. The problem is that it doesn't just do it to new posts, it has done it to every old post as well.
It has broken every Amazon ad on every post and page!! What's worse is that people probably don't even realize it has done this and every day it will be costing them earnings. I think this is a pretty major issue, and on my own site I don't even know what to do about it. I have hundreds of pages with ads that are broken, but I can't fix them because it just keeps adding the br tags back again.
Switching back to Classic Editor doesn't undo the br tags that it has added, so there's no way back that I can see. Apart from downgrading bak to wp4.something and then painstakingly going through hundreds and hundreds of posts to delete the br tags.
โ You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WordPress/gutenberg/issues/9056#issuecomment-451398434, or mute the thread https://github.com/notifications/unsubscribe-auth/AoeyeejCKMEWZ9_HCuZIV_9Xd81zpABOks5u_yMggaJpZM4WARet .
After examining my several sites, I'm now confused. On some of them, the Amazon Native Shopping Ads show up just fine, even with the line breaks within the script. On others, the ads do not show until I remove the script. So far, I can't see a difference between these instances.
Gary
On Fri, Jan 4, 2019 at 9:56 AM Gary Sonnenberg [email protected] wrote:
I thought for sure this would have been fixed before 5.0 came out, but it hasn't. Not even by 5.0.2.
Come on, guys, this is a big one. Can we get it done in 5.0.3 or 5.1?
Gary
On Fri, Jan 4, 2019 at 3:47 AM shuttermuse [email protected] wrote:
This has happened to me as well, and I'm guessing that it also happened to every other Amazon associate that uses ad code within their posts. The problem is that it doesn't just do it to new posts, it has done it to every old post as well.
It has broken every Amazon ad on every post and page!! What's worse is that people probably don't even realize it has done this and every day it will be costing them earnings. I think this is a pretty major issue, and on my own site I don't even know what to do about it. I have hundreds of pages with ads that are broken, but I can't fix them because it just keeps adding the br tags back again.
Switching back to Classic Editor doesn't undo the br tags that it has added, so there's no way back that I can see. Apart from downgrading bak to wp4.something and then painstakingly going through hundreds and hundreds of posts to delete the br tags.
โ You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WordPress/gutenberg/issues/9056#issuecomment-451398434, or mute the thread https://github.com/notifications/unsubscribe-auth/AoeyeejCKMEWZ9_HCuZIV_9Xd81zpABOks5u_yMggaJpZM4WARet .
Strange. Can you share the url of a page where it is working?
I have 4 sites and it broke the ads on all of them.
Sure. This Post still has the line break tags within the Amazon script:
https://opticsoasis.com/sonicking-adjustable-rifle-bipod-a-solid-newcomer/
The ads are at the end of the post.
Gary
On Fri, Jan 4, 2019 at 1:39 PM shuttermuse [email protected] wrote:
Strange. Can you share the url of a page where it is working?
I have 4 sites and it broke the ads on all of them.
โ You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WordPress/gutenberg/issues/9056#issuecomment-451546980, or mute the thread https://github.com/notifications/unsubscribe-auth/AoeyeZG_jEt9WfHvsXj7DDoKT0ZReSZAks5u_64EgaJpZM4WARet .
Sorry, I don't think I replied to all the first time.
This Post still has the line break tags within the Amazon script:
https://opticsoasis.com/sonicking-adjustable-rifle-bipod-a-solid-newcomer/
The ads are at the end of the post.
Gary
On Fri, Jan 4, 2019 at 1:39 PM shuttermuse [email protected] wrote:
Strange. Can you share the url of a page where it is working?
I have 4 sites and it broke the ads on all of them.
โ You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WordPress/gutenberg/issues/9056#issuecomment-451546980, or mute the thread https://github.com/notifications/unsubscribe-auth/AoeyeZG_jEt9WfHvsXj7DDoKT0ZReSZAks5u_64EgaJpZM4WARet .
No, the ads don't display for me. Perhaps you had some browser caching going on. Definitely not working as far as I can see.
Ok, thanks. Or maybe my being logged in.
Gary
On Fri, Jan 4, 2019 at 1:45 PM shuttermuse [email protected] wrote:
No, the ads don't display for me. Perhaps you had some browser caching going on. Definitely not working as far as I can see.
โ You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WordPress/gutenberg/issues/9056#issuecomment-451548671, or mute the thread https://github.com/notifications/unsubscribe-auth/AoeyeZNC-KeMYcIIEEv-Lr8Zi6VwW2bgks5u_69lgaJpZM4WARet .
Ok, I know I'm usually contrary, but this is weird. Since posting my problem, WP/GTB has updated to 5.02. When I saw your posts, I went to check one of my 7 sites.
I have some posts that I haven't converted to Gutenberg blocks; everything is in one giant Classic block. (Am updating as I go). Within that giant Classic block, the code appears correctly. The Amazon ads are showing properly on the post UNTIL I update that post without converting it to Gutenberg blocks. Now I have the tags too and the ads aren't showing. Gone. That's this page:
https://home-sweet-decor.com/a-babysitter-notebook-is-super-handy-and-gives-you-peace-of-mind/
In my 'Gutenberg block posts' (those created after the update), I have the Amazon code in a Custom HTML block. The code appears correctly both in the editor and on the published post. That's this page:
https://home-sweet-decor.com/soccer-wall-clocks/
When converting some posts to Gutenberg, I found that the code would get messed up with tags if I just copied it over to it's new Custom HTML block. The code HAD to be freshly generated. That one has me stumped. It was working in the post BEFORE updating, but copying it from it's old Classic block to a new Custom HTML block of it's own, breaks it. Now there's a headscratcher. :)
Hope the extra detail helps a little. :) I did clear my browser cache.
Best, Sylvia
I haven't converted any Classic Blocks. My ads are not showing because of the line break tags in those blocks.
My theme is usually Twenty Sixteen, in case that matters.
Gary
On Fri, Jan 4, 2019 at 2:58 PM SylviaMayfield [email protected] wrote:
Ok, I know I'm usually contrary, but this is weird. Since posting my problem, WP/GTB has updated to 5.02. When I saw your posts, I went to check one of my 7 sites.
I have some posts that I haven't converted to Gutenberg blocks; everything is in one giant Classic block. (Am updating as I go). Within that giant Classic block, the code appears correctly. The Amazon ads are showing properly on the post UNTIL I update that post without converting it to Gutenberg blocks. Now I have the tags too and the ads aren't showing. Gone. That's this page:
https://home-sweet-decor.com/a-babysitter-notebook-is-super-handy-and-gives-you-peace-of-mind/
In my 'Gutenberg block posts' (those created after the update), I have the Amazon code in a Custom HTML block. The code appears correctly both in the editor and on the published post. That's this page:
https://home-sweet-decor.com/soccer-wall-clocks/
When converting some posts to Gutenberg, I found that the code would get messed up with tags if I just copied it over to it's new Custom HTML block. The code HAD to be freshly generated. That one has me stumped. It was working in the post BEFORE updating, but copying it from it's old Classic block to a new Custom HTML block of it's own, breaks it. Now there's a headscratcher. :)
Hope the extra detail helps a little. :) I did clear my browser cache.
Best, Sylvia
โ You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WordPress/gutenberg/issues/9056#issuecomment-451566344, or mute the thread https://github.com/notifications/unsubscribe-auth/AoeyeSvFh7Y__rGCRQtdgvTX-h6QHAWlks5u_8BZgaJpZM4WARet .
@glsonn Did you open those posts and update anything in them or maybe just exit the post? Seems like it's happening right in there someplace. On mine the tags got added after I updated the post in any way.
Even if I didn't update anything in that post, I have to click the Update button. You get the "Are you sure you want to leave" box if you don't.
So even though I may just have opened them to look (like the babysitter post) - I had to click the Update button to exit the editor and then I had the tags and the ads poofed.
hth Sylvia
I see a post on my site that isn't showing the ads. I click Edit, then Edit as HTML. I see the br tags and delete them.
These posts have not been touched since the Gutenberg update (until today, of course).
Gary
On Fri, Jan 4, 2019 at 3:15 PM Sylvia [email protected] wrote:
@glsonn https://github.com/glsonn Did you open those posts and update anything in them or maybe just exit the post? Seems like it's happening right in there someplace. On mine the tags got added after I updated the post in any way.
Even if I didn't update anything in that post, I have to click the Update button. You get the "Are you sure you want to leave" box if you don't.
So even though I may just have opened them to look (like the babysitter post) - I had to click the Update button to exit the editor.
hth Sylvia
โ You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/WordPress/gutenberg/issues/9056#issuecomment-451570546, or mute the thread https://github.com/notifications/unsubscribe-auth/AoeyeYGdBmLFFC1yxTOO0OHZq0KxHUcpks5u_8RxgaJpZM4WARet .
"UNTIL I update that post without converting it to Gutenberg blocks."
Yes that's exactly when it happens. The problem is that it will keep adding them back even if you keep editing them to remove them. If you delete the br tags and press the update button it'll just add them all back.
The way around it is to warp the ad code in <!-- wp:html --> AD CODE <!-- /wp:html --> by using the HTML editor view on your one giant classic block.
It's finicky though. Sometimes it is also adding some p tags in there too and you need to get rid of those.
Sadly this means if you edit old posts you are going to have to keep performing this fix on every one you open. I don't even think you have tp press the update button. If you wait one minute it autosaves and I think that also adds the tags.
That will probably help @glsonn. As for me, I'm updating old posts to Gutenberg as fast as possible and resisting the urge to open pre-Gutenberg posts. lol As long as they are still showing for now and until I get to convert the posts, I'm happy. ;)
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free. www.avg.com http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Fri, Jan 4, 2019 at 3:45 PM shuttermuse [email protected] wrote:
"UNTIL I update that post without converting it to Gutenberg blocks."
Yes that's exactly when it happens. The problem is that it will keep adding them back even if you keep editing them to remove them. If you delete the br tags and press the update button it'll just add them all back.
The way around it is to warp the ad code in AD CODE by using the HTML editor view on your one giant classic block.
It's finicky though. Sometimes it is also adding some p tags in there too and you need to get rid of those
โ You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/WordPress/gutenberg/issues/9056#issuecomment-451577523, or mute the thread https://github.com/notifications/unsubscribe-auth/Apd9rjtdcfpc4APL77-LI5WovxAXUF-Kks5u_8tdgaJpZM4WARet .
--
Home Sweet Decor https://home-sweet-decor.com
Creative Costume Ideas https://creative-costume-ideas.com
Fancy Gift Wrap https://fancygiftwrap.com