News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Quick edit gives an error

Started by Arvacon, December 11, 2012, 10:54:02 PM

Previous topic - Next topic

Arvacon

Hi.
I have a problem with the quick edit function.
When you push the small pen of it at the bottom right of the posts, it is opening the editor's window, but it seems blank at the place you type your post and at title too.
Every time I push this button I see an error message at my log file, so what do I need to do to solve this problem?
When you push the normal edit button at top right, everything works ok.
I will try to upload a picture with the log file.
Here you can see the code of the two links that the error file gives me.


This XML file does not appear to have any style information associated with it. The document tree is shown below.
<smf>
<subject>
<![CDATA[ ]]>
</subject>
<message id="msg_1">
<![CDATA[ ]]>
</message>
</smf>


412: {
413: global $smcFunc;
414:
415: // Remove spaces (32), tabs (9), returns (13, 10, and 11), nulls (0), and hard spaces. (160)
416: if (!is_array($var))
417: return isset($smcFunc) ? $smcFunc['htmltrim']($var) : trim($var, ' ' . "\t\n\r\x0B" . '\0' . "\xA0");
418:
419: // Go through all the elements and remove the whitespace.
420: foreach ($var as $k => $v)
421: $var[$k] = $level > 25 ? null : htmltrim__recursive($v, $level + 1);
422:
423: return $var;
424: }
425:
426: // Clean up the XML to make sure it doesn't contain invalid characters.
427: function cleanXml($string)
428: {
429: global $context;
430:
431: // http://www.w3.org/TR/2000/REC-xml-20001006#NT-Char
==>432: return preg_replace('~[\x00-\x08\x0B\x0C\x0E-\x19' . ($context['utf8'] ? (@version_compare(PHP_VERSION, '4.3.3') != -1 ? '\x{D800}-\x{DFFF}\x{FFFE}\x{FFFF}' : "\xED\xA0\x80-\xED\xBF\xBF\xEF\xBF\xBE\xEF\xBF\xBF") : '') . ']~' . ($context['utf8'] ? 'u' : ''), '', $string);
433: }
434:
435: function JavaScriptEscape($string)
436: {
437: global $scripturl;
438:
439: return '\'' . strtr($string, array(
440: "\r" => '',
441: "\n" => '\\n',
442: "\t" => '\\t',
443: '\\' => '\\\\',
444: '\'' => '\\\'',
445: '</' => '<\' + \'/',
446: 'script' => 'scri\'+\'pt',
447: '<a href' => '<a hr\'+\'ef',
448: $scripturl => $scripturl . '\'+\'',
449: )) . '\'';
450: }
451:
452: // Rewrite URLs to include the session ID.

vbgamer45

Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arvacon

I use the "TinyPortal", "Ad Management" and "Allow Access while in Maintance mode"

vbgamer45

Try disabling each mod and see if one of them causes the issue.

Error occurs due to <message id="msg_1"> injected into the xml feed.
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arvacon

I didn't know how to disable them, so I uninstalled them one by one and I was trying every time to see if the problem solved, but nothing happened.
By the way, is there any other way to disable a mod, or that's the only way?

Arvacon

Hi.
I just found the solution, so the quick edit function works again without any errors.
I was searching at google, when I found this topic at the russian smf forum, at post 23. http://www.simplemachines.ru/index.php?topic=14269.0
I did translate at the page and I found at the end of that topic that some code of file QueryString.php at line 432, needs to be replaced.

This code must be replaced
preg_replace('~[\x00-\x08\x0B\x0C\x0E-\x19' . ($context['utf8'] ? ([at]version_compare(PHP_VERSION, '4.3.3') != -1 ? '\x{D800}-\x{DFFF}\x{FFFE}\x{FFFF}' : "\xED\xA0\x80-\xED\xBF\xBF\xEF\xBF\xBE\xEF\xBF\xBF") : '') . ']~' . ($context['utf8'] ? 'u' : ''), '', $string)

with this one
return preg_replace('~[\x00-\x08\x0B\x0C\x0E-\x19' . ($context['utf8'] ? '\x{FFFE}\x{FFFF}' : '') . ']~' . ($context['utf8'] ? 'u' : ''), '', $string);

I don't know why the above code need to change, but it works.  ::)




Edit: I just installed also my mods again and everything works great, so I will mark this topic as solved.

By the way, if someone knows about why this code was need correction and about if there is a better way to disable a mod, than uninstall it as I did before, it would be nice to post it here.

Thanks for your help vbgamer45 :)

vbgamer45

At the moment the only way to disable a mod is that you have to uninstall it unfortunately.

But glad you were able to figure out the issue.
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: