News Feed Ticker fail when JSON are used and field contain a Carriage Return LineFeed

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
Michael Fiil
 
 
Posts: 28
Joined: Thu Nov 04, 2021 1:07 pm

News Feed Ticker fail when JSON are used and field contain a Carriage Return LineFeed

Post by Michael Fiil »

Hi - i am still using WBB 16 :-)
When using JSON as data source and description field contain an CR-Linefeed the Feed Ticker 'hangs'. If CR-Linefeed are removed it works perfect.

Any way to solve this?

This fails:
[{"link": "", "title": "★★★★☆", "description": "Developer Jürgen Hartsen @ Taxfree Cars : Michael, you are strong in terms of business and good at guiding through examples seen from users and customers.
I also admire your empathy. No one is left behind and everyone but yourself gets the credit.", "date": "2024-10-7"}]

This works:
[{"link": "", "title": "★★★★☆", "description": "Developer Jürgen Hartsen @ Taxfree Cars : Michael, you are strong in terms of business and good at guiding through examples seen from users and customers. I also admire your empathy. No one is left behind and everyone but yourself gets the credit.", "date": "2024-10-7"}]

Best Regards
Michael Fiil (Denmark)
User avatar
Pablo
 
Posts: 23916
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: News Feed Ticker fail when JSON are used and field contain a Carriage Return LineFeed

Post by Pablo »

Note that WB16 is no longer supported.

Did you try it with WB20?
If that also does not work, then can you share a demo project?

Image
Michael Fiil
 
 
Posts: 28
Joined: Thu Nov 04, 2021 1:07 pm

Re: News Feed Ticker fail when JSON are used and field contain a Carriage Return LineFeed

Post by Michael Fiil »

Thank You Pablo - no i have not. I have WB17 also but still use 16 because it works for me. In WB17 the problem are the same.
Do you know of the issue? (can't find any post about it here!) I have no trouble buying version 20 but if the problem is still there - why should I?
User avatar
BaconFries
 
 
Posts: 6125
Joined: Thu Aug 16, 2007 7:32 pm

Re: News Feed Ticker fail when JSON are used and field contain a Carriage Return LineFeed

Post by BaconFries »

You should also note that WWB 17 is also not supported anymore. Have you tried simply installing WWB20 as a "Demo" to see if it resolves this?. As suggested by Pablo please provide a "Demo" project the .wbs not a link to the page the news ticker is on. When providing a "Demo" all that is required is basic one page with the news ticker as this makes it easier to see what may be wrong
User avatar
BaconFries
 
 
Posts: 6125
Joined: Thu Aug 16, 2007 7:32 pm

Re: News Feed Ticker fail when JSON are used and field contain a Carriage Return LineFeed

Post by BaconFries »

Pablo is it not the case that json doesn't allow literal line breaks and they require to be escaped?. Such as \n for a new line or \r\n for a carriage return followed by a new line?.
Michael Fiil
 
 
Posts: 28
Joined: Thu Nov 04, 2021 1:07 pm

Re: News Feed Ticker fail when JSON are used and field contain a Carriage Return LineFeed

Post by Michael Fiil »

Thank you Pablo and BaconFries,

I have downloaded free version of version 20. Same issue.
Small project can be downloaded here https://carmagic.dk/pablosoftware/test- ... r-wb20.wbs

I love WYSIWYG Webbuilder - been using it since 2008 - problems arise but are resolved :-)
Michael Fiil
 
 
Posts: 28
Joined: Thu Nov 04, 2021 1:07 pm

Re: News Feed Ticker fail when JSON are used and field contain a Carriage Return LineFeed

Post by Michael Fiil »

I think you are right BaconFries, but in my case a customer review is entered via a form made in webbuilder (textarea) where 'enter' can be entered for CR+Linefeed!
If the solution is that I have to code a validation before data is saved in mysql, I'll figure it out. As long as we find a workable solution as usual :-)
User avatar
Pablo
 
Posts: 23916
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: News Feed Ticker fail when JSON are used and field contain a Carriage Return LineFeed

Post by Pablo »

I doubt that this have anything to do with Web Builder.

Here's the chatgpt's answer:
JSON doesn’t allow literal line breaks in strings, so you must escape them.
{
"message": "Line 1\nLine 2"
}
Michael Fiil
 
 
Posts: 28
Joined: Thu Nov 04, 2021 1:07 pm

Re: News Feed Ticker fail when JSON are used and field contain a Carriage Return LineFeed

Post by Michael Fiil »

Thank you i find out how to escape the the CR+LF. :-)

Nice weekend to all
Post Reply