TinyPortal

Development => Support => Topic started by: Hamster on February 21, 2009, 08:25:10 AM

Title: Editing HTML/BBC blocks goes to blank page & "HTML + Javascript" is buggy
Post by: Hamster on February 21, 2009, 08:25:10 AM
URL: http://www.playground4u.info
TP: 1.07 beta3

I updated to this beta from 1.06 beta2.
I have 2 HTML/BBC blocks on my site. They show the gameserver status via javascript.
Whenever I try to edit them, I get a blank page. Also, whenever I try to add a new block, it gets me a blank page, since it goes into HTML/BBC editing mode by default. It still creates the new block though and in the "Panels and Blocks" settings, i can make it another kind of block and then edit.

The HTML + javascript blocktype seems not to be working with the Splatterladder serverstatus script:
<script language='JavaScript' src='http://et.splatterladder.com/export/servermon.js.php?ip=78.46.102.199:27960'></script>
When I click on the "<>" button, insert the code, and save, nothing gets saved. When I click the button, insert code, click hide html, click <> again, then save, the code gets saved correctly. If I however click on <> again, it doesn't display my original code anymore but instead, i think, the info it got from the javascript. And since it's a status script, it wouldn't be accurate anymore.
Title: Re: Editing HTML/BBC blocks goes to blank page & "HTML + Javascript" is buggy
Post by: G6Cad on February 21, 2009, 10:24:11 AM
Turn off the editor and try edit it again.
Title: Re: Editing HTML/BBC blocks goes to blank page & "HTML + Javascript" is buggy
Post by: Hamster on February 21, 2009, 10:44:20 AM
Which editor and where? :)
Title: Re: Editing HTML/BBC blocks goes to blank page & "HTML + Javascript" is buggy
Post by: Ken. on February 21, 2009, 10:53:40 AM
Quote from: Hamster on February 21, 2009, 10:44:20 AM
Which editor and where? :)

Check here:
Admin>TinyPortal>Articles and Categories>Settings>Use the WYSIWYG editor?>Yes/No
Title: Re: Editing HTML/BBC blocks goes to blank page & "HTML + Javascript" is buggy
Post by: Hamster on February 21, 2009, 11:10:12 AM
Nice. The HTML + Javascript blocks now show my original code correctly.

But HTML/BBC blocks still give a blank page when I try to edit them.
Title: Re: Editing HTML/BBC blocks goes to blank page & "HTML + Javascript" is buggy
Post by: G6Cad on February 21, 2009, 11:17:45 AM
Must be your code you use, check it and test again, test the code in a scriptblock and see if it shows up correctly.
Title: Re: Editing HTML/BBC blocks goes to blank page & "HTML + Javascript" is buggy
Post by: Hamster on February 21, 2009, 11:25:00 AM
If you mean the code of the HTML/BBC blocks, then there is none. It gives me a blank even if I create a new block (new blocks are automatically HTML/BBC blocks), I get a blank page since creating a new block automatically takes me into editing mode.

Edit:// this guy here seems to have the same problem: http://www.tinyportal.net/index.php/topic,28475.0.html "Major problem"
Title: Re: Editing HTML/BBC blocks goes to blank page & "HTML + Javascript" is buggy
Post by: G6Cad on February 21, 2009, 12:59:50 PM
Must be something that went wrong when you installed TP, we dont have this here on this site, nor our own sites.
Can you take your time and confirm your install of TP and make sure it got installed correctly.

Offcourse with no other theme then Default Core theme.

How do I manually install TinyPortal (http://docs.tinyportal.co.uk/index.php?topic=29)

Modification Instructions (http://docs.tinyportal.co.uk/index.php?topic=140)
Title: Re: Editing HTML/BBC blocks goes to blank page & "HTML + Javascript" is buggy
Post by: Renegd98 on February 21, 2009, 02:08:27 PM
When using the WYSIWYG editor, if you use the <> button on top right end of the menu it will switch between code and user view.
Title: Re: Editing HTML/BBC blocks goes to blank page & "HTML + Javascript" is buggy
Post by: Hamster on February 21, 2009, 02:42:42 PM
I finally figured out the problem.
I figured to check the apache/php errorlog. (I should have done that in the first place, stupid me.)
What I found:
[Sat Feb 21 15:11:19 2009] [error] [client ###.###.###.###] PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 9 bytes) in /#####/Sources/Subs-Post.php on line 1406, referer: http://www.playground4u.info/index.php?action=tpadmin;sa=blocks
Allowed memory size of 8388608 bytes exhausted (tried to allocate 20914 bytes)

Interesting is that this was the first time something wanted more memory.
Yea, 8MB isn't much but shouldn't something as simple as the editor handle with less than that? :)

Thanks everybody for helping.
Title: Re: Editing HTML/BBC blocks goes to blank page & "HTML + Javascript" is buggy
Post by: IchBin on February 21, 2009, 03:41:31 PM
Its not just the editor. Its EVERYTHING that is loading into memory when SMF and TP run. It loads all the scripts into memory. 8MB is the default PHP install, but IMO 16MB should be default.
Title: Re: Editing HTML/BBC blocks goes to blank page & "HTML + Javascript" is buggy
Post by: virtualdave on May 27, 2009, 06:41:24 PM
This sounds like my problem as well. Where can I adjust the memory allocation?
vd

I checked php.info and found this...

Memory Size  16,777,152 Bytes 

Memory Available  1,856 Bytes 

Memory Allocated  16,775,296 Bytes

So it seems as if I need more memory. I have two instances of SMF with TP installed running on this server. So I guess that has used up most of the memory available. Am I on the right track here.
VD
Title: Re: Editing HTML/BBC blocks goes to blank page & "HTML + Javascript" is buggy
Post by: IchBin on May 27, 2009, 07:54:55 PM
php.ini on your server is where you change the memory limit.
Title: Re: Editing HTML/BBC blocks goes to blank page & "HTML + Javascript" is buggy
Post by: virtualdave on May 28, 2009, 03:27:29 PM
I checked with the host Monte Carlo and I have 320M of php memory. So I'm guessing memory is not the issue. The problem seems to have just started since I upgraded to SMF 1.1.9. I'm going to try a new tack and see if that helps to resolve my prob.
thanks
VD
Title: Re: Editing HTML/BBC blocks goes to blank page & "HTML + Javascript" is buggy
Post by: ZarPrime on May 28, 2009, 06:02:08 PM
VD,

Please let us know if you solve it and what you had to do.

ZarPrime