Custom HTML text screen

CUSTOM HTML text Screen, a deeper examination:

@David, The reason I recommend not to use the Custom HTML text screen is that it gives so many people trouble and it doesn’t seem to have a solution. Here @jonathanmiami is saying magic_quotes_gpc = Off is the solution, but you’re saying that’s not the problem. Happily I would blog about what to fix about the backend if we knew what to fix. Using the screen is best done by first having a copy of the file since it’s subject to sudden and arbritary loss. Now mind you I love using the editor (and would love it more of it was mobile friendly). But the uncertainanty of when it will work and when it will not had led me to no longer use it. I can accomplish same without it. For new users it’s frustrating because they’re unaware of the issues.

Perhaps I’m wrong but my understanding is that the screen simply allows the hosting of the file in a server, the server hosting the Control Panel in particular, with the use of the text editor.

If such is correct, then using my own text editor and placing the file online I accomplish same without the uncertainty.

An interesting issue came up the other day. The user need to refresh a dynamic page, but to do needed the pages URL. Don’t exactly remember the setup, but the solution was to not use the screen, but instead use a HTML doc screen via a URL. I assume the Control Panel was masking the URL making the page refresh a problem. This has nothing to do with the backend problem, but just opened up the question, how does the Control handle the URL?

So, my question is how to determine the problem and what’s the solution, otherwise I’ll just sidestep is issue by not using the screen.



@David a huge constant bug report is the editor not saving the information/code sometimes. It’s caused me so many headaches this past… year?

This is why I do not recommend using custom HTML either unless you backup the html on your computer before saving and leaving the screen – it’s -extremely- erratic when it comes to saving and not saving.

It’s been established that the editor simply doesn’t work and needs fixing/updating/new one -however you guys have been busy (understandable) and haven’t been able to look into it yet (haven’t seen any replies on the bug reports about this). Would love to know if this can be looked at sometime soon!

* Best way to fix this for now is as Fred says: create a html document with another editor, upload it somewhere like drop box and use the custom url screen!

Hope all is well!

By David @Buzztouch,

“Makes sense guys.

The only ongoing issue I’m aware of is the order in which the Save button is used. When the screen is re-visited and the Save button is used that NOT under the html / text entry box, like in the advanced settings, it doesn’t save the contents of the text / html entry. This is the way I understand it, could be different.

I’ll find some time to dig into this and update the plugin, we’ll go from there.


Diagnose and fixed @MadRod’s problem. It was NOT related to the “save button.” Here’s what I did…

a) I logged into the self hosted panel and looked at the funky screen. This is a Custom HTML / Text screen. I verified that the HTML was NOT SAVING. An img tag was empty and had no source after adding one then saving.

b) I entered a URL from a random image and saved. Refreshed the page, NOT SAVED. This verified the “not saving” issue.

c) I connected to the server with FTP and downloaded the html file that is created each time you click Save when working with HTML /Text. These files are stored in each applications documents directory. In this case:

/files/applications/[app id]/documents/customHTML_[screen id].html

customHTML_[screen id].html is the file. The file contained the data as expected BUT it contained some additional slashes surrounding the src attribute for the image.

d) Because the extra slashes are being added by PHP “automatically” using php’s built in magic_quotes routine, I adjusted the code to check to see if magic_quotes was on and if it was, I stripped these extra slashes. This was done in save_AJAX.php in the BT_screen_customHTML plugin folder.

I added this on line 195 of save_AJAX.php


//remove automatically inserted slashes! $editorContent = stripslashes($editorContent);


e) I re visited the screen, added an image src then saved. Fixed.

I’ve added this to the plugin issue list and will get this update included with some other updates I’ve been trying to get released.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s