TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,027
  • Total Topics: 21,334
  • Online today: 519
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 241
  • Total: 241

Bug report PHP Articles

Started by rocknroller, October 14, 2012, 04:16:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rocknroller

All latest versions TP and SMF.


There is issue with textarea, I mean where you need to put code for article.
If you in your custom code use form, and that form include tag textarea. It will broke the setup page.

As we know textarea form must be open and closed <textarea> </textarea>

TP recognize closing tag </textarea> from user custom form it should not be doing that.

Look at the pic.

Tra

IchBin

What if you break up the textarea tag? 

echo '<text'.'area>';

I think it is an old bug IIRC.

rocknroller

I don't know maybe you can solve it like that in php but it's also in HTML article, i had problems with it when I was migrate from SP.

First time when you paste HTML code into article it's good until you edit same article. On form below if I press save it will be broken. SP don't have that bug I don't know how they solve it.

http://www.logooff.net/index.php?page=contact

in attachment is how it is look if I edit article.

Tra

IchBin

Does it do the same thing if you have the wysiwyg editor turned off?

IchBin

#4
Ah I see the problem. Too bad we didn't catch this one sooner. It'll have to be in the next release. If I get an easy enough fix I'll post the changes.

Doing something like this might give a work around until the next version.

in TPortalAdmin.php find on about line #1608

                if($smcFunc['db_num_rows']($request) > 0)
                {
                        $context['TPortal']['editarticle'] = $smcFunc['db_fetch_assoc']($request);
                        $smcFunc['db_free_result']($request);
                }


Replace with:
                if($smcFunc['db_num_rows']($request) > 0)
                {
                        $context['TPortal']['editarticle'] = $smcFunc['db_fetch_assoc']($request);
                        $context['TPortal']['editarticle']['body'] = $smcFunc['htmlspecialchars']($context['TPortal']['editarticle']['body'], ENT_QUOTES);
                        $smcFunc['db_free_result']($request);
                }

rocknroller

Thank you IchBin for quick support. It's really great to see that feature work.  :) We use lots of custom coding on our community.
Tra

IchBin

No problem. Glad it worked for you. Now I just need to figure out the best way to fix it for future. :)

This website is proudly hosted on Crocweb Cloud Website Hosting.