SMF 2.0.18 - Need Help -

Started by Painlesstom, March 15, 2021, 09:18:18 AM

Previous topic - Next topic

Painlesstom

Recently I've had some members using iPhones having issues making their posts since anytime they use an apostrophe, it and everything after it is gone when they post. I see the error in the logs for every time anyone uses an apostrophe, but only those with iPhones have their text removed in post. I've uninstalled all the smiley mods in an effort to effect a change, but to no avail. Need some expert direction. Thanks.

2: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback insteadApply Filter: Only show the errors from this fileFile: /home/customer/www/improvingyourmokai.com/public_html/Sources/Subs-Editor.php
Line: 136

   $text = preg_replace('~(?:\s|&nbsp;)?<(img\ssrc="' . preg_quote($modSettings['smileys_url'], '~') . '/[^<>]+?/([^<>]+?)"\s*)[^<>]*?class="smiley" />~e', '\'<\' . ' . 'stripslashes(\'$1\') . \'alt="" title="" onresizestart="return false;" id="smiley_\' . ' . "\$" . 'i++ . \'_$2" style="padding: 0 3px 0 3px;" />\'', $text);

Sir Osis of Liver

PHP version?  Have you converted database to utf8?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Painlesstom

PHP 7.3.27 and I just converted to UTF-8 as a result of your inquiry. I'll let you know if it fixed it.

shawnb61

Are you sure you're on 2.0.18?  That line does not match 2.0.18 code.  It is using older syntax, incompatible with php 7.3. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Painlesstom

Yes, no doubt about it. So maybe that code is a leftover artifact that needs to be deleted? 

Painlesstom

And FYI I get the same error as you probably expected to hear.

Kindred

did you install 2.0.18 or upgrade to it?

What mods do you have installed?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Painlesstom

Upgraded to it, but the problem didn't start immediately after the upgrades. It was weeks later, and during a period where I hadn't added or changed anything. Initially I thought it was a glitch with his iPhone, but other iPhone users had the same problem. The error log shows the same error for anyone that uses that ' character, but only iPhone users have had the rest of their text deleted when they post.

efk

These 3 mods seems to be from SMF 1.x.x , and all 3 features are default for 2.0. Maybe his problem comes because of this mods.

Add IP2Location to Track IP
Age and Location
Online Users Area

Painlesstom

Thanks for the suggestions guys, but none of those things made any difference. I deleted the offending code in the subs-editor.php file and that solved the problem. Posts are coming through intact now. Marking as SOLVED.   8)

Kindred

Deleting code randomly is not a solution.  It just makes the actual problem more difficult to diagnose
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Aleksi "Lex" Kilpinen

Also, randomly deleting any code that handles any user input may actually end up leaving your whole forum vulnerable to attacks.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: