Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2016-11-03 23:41:26

dlangan
Member
Registered: 2016-09-05
Posts: 76

Using <textarea> tag in page copy breaks editor

Hi there, I'm reporting a bug in backlight.  As per the subject, using html <textarea> breaks the page editor in Backlight.

I've carried out numerous tests & the most basic test using <textarea> breaks the page editor.

The most basic test was to include this text in the Page Copy 'Main Copy' section of a test page :

  <textarea name="thetext" rows="20" cols="80">
   First line of initial text.
   Second line of initial text.
   </textarea>

When I come out of the page editor & go back into it, the last line </textarea> is missing. 

When using <form> & buttons (as per below) when you re-enter the page editor main copy, the active buttons are showing up on the page editor window. (To replicate the error user must go to View Page & back in to 'design' to see the problem. If you stay & save changes in designer all day the problem isn't visible until you go back a level to View Page & then go back to design).

This will really demonstrate the problem more easily:
<FORM action="http://somesite.com/prog/text-read" method="post">
   <P>
   <TEXTAREA name="thetext" rows="20" cols="80">
   First line of initial text.
   Second line of initial text.
   </TEXTAREA>
   <INPUT type="submit" value="Send"><INPUT type="reset">
   </P>
</FORM>

If there's a work around please let me know.  I was hoping to find an alternative multi-line input field but apparently there isn't one.

Many thanks,
Deirdre

Offline

#2 2016-11-03 23:52:24

lofty
Member
From: UK
Registered: 2012-09-26
Posts: 259
Website

Re: Using <textarea> tag in page copy breaks editor

Yep, same happening for me too.

Offline

#3 2016-11-04 06:16:22

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Using <textarea> tag in page copy breaks editor

Thanks for raising this.  To be honest I think this is pushing the limits of inserting <html> within 'copy' fields.  We probably should have limited it to simple fields such as <strong>, <cite>, <img.../>
Anyway, this looks to be an issue with the designer page not escaping things as needed.  The actual html is saved correctly (assuming you don't re-save) after it's been truncated on viewing again.

I'll look to fix this.  If applying to an album or album set, it appears to save and load correctly when set as copy in the album settings in Lightroom.

Offline

#4 2016-11-04 07:20:55

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Using <textarea> tag in page copy breaks editor

In the upcoming Backlight version 1.1, this code can be inserted using phplugins. I think this will be much better than trying to insert html using page copy.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#5 2016-11-04 08:42:51

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Using <textarea> tag in page copy breaks editor

I have added a fix to allow html (and especially a closing </textarea>) within the textareas provided by Designer.  This will be in Backlight 1.1.

Offline

#6 2016-11-07 22:02:14

dlangan
Member
Registered: 2016-09-05
Posts: 76

Re: Using <textarea> tag in page copy breaks editor

Thanks Ben.  I didn't understand much of that (don't have a web design or html background), but I read it to mean it'll be fixed in next backlight release?  I don't know how to use phplugins but if next backlight version provides instructions I'll be happy to implement.

The difficulty I face with the <textarea> breaking the page editor is that it truncates everything below the offending <textarea></textarea> tags which means I have to keep a back up of the latest page copy so that I can copy & paste it when it fails.  But, I see what you mean - it'll do as a work around until the next release.

Thanks for taking a look at this & proposing to fix in 1.1! 
Deirdre

Offline

#7 2016-11-07 22:19:51

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Using <textarea> tag in page copy breaks editor

I don't know how to use phplugins but if next backlight version provides instructions I'll be happy to implement.

Backlight docs on phplugins: http://backlight.theturninggate.net/doc … _phplugins
And earlier CE4 docs, which get into much more detail: http://ce4.theturninggate.net/docs/doku … _phplugins

And the phplugins.php file (in the backlight/custom/phplugins folder) contains descriptions of all current hooks.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#8 2016-11-08 02:18:09

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Using <textarea> tag in page copy breaks editor

dlangan wrote:

Thanks Ben.  I didn't understand much of that (don't have a web design or html background), but I read it to mean it'll be fixed in next backlight release?  I don't know how to use phplugins but if next backlight version provides instructions I'll be happy to implement.

The difficulty I face with the <textarea> breaking the page editor is that it truncates everything below the offending <textarea></textarea> tags which means I have to keep a back up of the latest page copy so that I can copy & paste it when it fails.  But, I see what you mean - it'll do as a work around until the next release.

Thanks for taking a look at this & proposing to fix in 1.1! 
Deirdre

FYI: I just checked with the upcoming 1.1 and <textarea>..</textarea> works.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#9 2016-11-08 02:43:06

dlangan
Member
Registered: 2016-09-05
Posts: 76

Re: Using <textarea> tag in page copy breaks editor

That's great!  Thanks Daniel!

Offline

Board footer

Powered by FluxBB