News: Welcome to the TinyPortal Support site.

Login  |  Register
HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

August 21, 2019, 06:11:43 PM

Login with username, password and session length

Recent

Members
  • Total Members: 3751
  • Latest: tom888
Stats
  • Total Posts: 188690
  • Total Topics: 20745
  • Online Today: 102
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 0
Guests: 15
Total: 15

Author Topic: [TP1.0 Beta5] suspected bug in php block editor  (Read 1588 times)

0 Members and 1 Guest are viewing this topic.

Offline Blue Steel

  • Sr. Member
  • ****
  • Posts: 295
  • Back in the Business after at least 5 years
    • Coding Monkeys
[TP1.0 Beta5] suspected bug in php block editor
« on: April 19, 2010, 10:59:19 PM »
I think i've just found a bug in the php block editor (and maybe in the php articke editor .. not sure havn't tried it)

if i put in this code
Code: [Select]
// link to us php block
// for Tinyportal
// by BlueSteel
$ltu_text = "To link to us use this code/button on your site";
$ltu_site_url = "http://www.codingmonkeys.com/";
$ltu_img_src = "http://www.codingmonkeys.com/images/cm_link.gif";
$ltu_textarea_rows = 6;     // numbewr of lines in text selection box
$ltu_textarea_colums = 22; // number of characters accross in text selection box
$ltu_line_align = "center";
$ltu_img_align = "top";
$ltu_p_align = "center";
$ltu_onclick = "this.select()";
//------------------------------
// Dont Edit anything below here
//------------------------------
echo '<p align=',$ltu_p_align,'><B>',$ltu_text,'</B></p>
<p align=',$ltu_p_align,'><a href="',$ltu_site_url,'"><img src="',$ltu_img_src,'" border="0"alt="',$ltu_img_src,'"></a></p>
<p align=',$ltu_p_align,'><textarea onclick=',$ltu_onclick,' rows=',$ltu_textarea_rows,' cols=',$ltu_textarea_colums,' name=link1>
<a href="',$ltu_site_url,'"><img src="',$ltu_img_src,'" border="0"alt="',$ltu_img_src,'"></a></textarea></p>';

the next time i edit it , its getting truncated to (in the edit box)
Code: [Select]
// link to us php block
// for Tinyportal
// by BlueSteel
$ltu_text = "To link to us use this code/button on your site";
$ltu_site_url = "http://www.codingmonkeys.com/";
$ltu_img_src = "http://www.codingmonkeys.com/images/cm_link.gif";
$ltu_textarea_rows = 6;     // numbewr of lines in text selection box
$ltu_textarea_colums = 22; // number of characters accross in text selection box
$ltu_line_align = "center";
$ltu_img_align = "top";
$ltu_p_align = "center";
$ltu_onclick = "this.select()";
//------------------------------
// Dont Edit anything below here
//------------------------------
echo '<p align=',$ltu_p_align,'><B>',$ltu_text,'</B></p>
<p align=',$ltu_p_align,'><a href="',$ltu_site_url,'"><img src="',$ltu_img_src,'" border="0"alt="',$ltu_img_src,'"></a></p>
<p align=',$ltu_p_align,'><textarea onclick=',$ltu_onclick,' rows=',$ltu_textarea_rows,' cols=',$ltu_textarea_colums,' name=link1>
<a href="',$ltu_site_url,'"><img src="',$ltu_img_src,'" border="0"alt="',$ltu_img_src,'"></a>

it apears to be dropping </textarea> and anything after it ..
stuffing up the block and anyrthing after it if you have any format closing arguments eg: </div> </td> </tr> </tbody> </table> </p> etc.. etc..

It took me ages to figure out what was going on
so you need to save a copy of the block elsewhere or you've lost some of your block/article (untill a solution is found.. you have been warned ;) )
« Last Edit: April 19, 2010, 11:03:35 PM by BlueSteel »

Offline lurkalot

  • Administrator
  • *
  • Posts: 6146
    • Camera Craniums
Re: [TP1.0 Beta5] suspected bug in php block editor
« Reply #1 on: April 20, 2010, 02:30:03 AM »

I think i've just found a bug in the php block editor (and maybe in the php articke editor .. not sure havn't tried it)


BlueSteel,

Just tested this on my test site, and it does the same.  Works well until you Revisit the block to edit it and even clicking save again without actually changing the code results in a mess.

Tried it in an article, and all worked fine until I moved it to another category, then messes up the same as as a php block.

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: [TP1.0 Beta5] suspected bug in php block editor
« Reply #2 on: April 20, 2010, 08:55:51 AM »
Put it in the bug tracker please.