Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Roger2 on December 25, 2021, 11:25:12 AM

Title: Very strange smiley performance following upgrade
Post by: Roger2 on December 25, 2021, 11:25:12 AM
Hi folks

Been using SMF successfully for many years. I did a clean V2.08 install about 2015 and have nominally kept it up-to-date since - although I was on 2.0.17 for longer than I perhaps should have been.

Last night I upgrade to 2.0.19 in the recommended manner - went to 2.0.18 first. All tests successful at both upgrades and all seemed well. However, since this upgrade, only some of the smiley words parse to smileys when posting. All existing posts seem to have all smileys ok - but if I quote a post with smileys in, some parse and others don't (leaving just the words).

Is this a known issue? All Smileys are in the default group (and others for that matter) and all appear in the edit screen.
Title: Re: Very strange smiley performance following upgrade
Post by: Roger2 on December 25, 2021, 11:30:01 AM
A possible clue - not checked them all. Some smiley texts are plain such as ThumbUp , others are enclosed between colons :smiley: - and others are inside single speech marks 'LikeThis'. I think the ones in speech marks are the ones that don't parse.

Edit: No wrong. Some of the PlainText smileys aren't parsing wither - but I think all those between colons are. Sample size may be too small for this to be significant.

Curiouser and curriouser.
Title: Re: Very strange smiley performance following upgrade
Post by: Sir Osis of Liver on December 25, 2021, 04:26:31 PM
Which theme are you using?  Same problem in Curve?
Title: Re: Very strange smiley performance following upgrade
Post by: Roger2 on December 25, 2021, 07:25:32 PM
Quote from: Sir Osis of Liver on December 25, 2021, 04:26:31 PMWhich theme are you using?  Same problem in Curve?

Standard - Curve. I briefly experimented with themes but reverted to standard at least 4 years ago.

The board is a support forum for oil technicians (http://www.oiltechs.org/forum/) I have created a user profile - smftest, password testsmf1, that can see the sandbox. Would be grateful for any pointers - feel free to play with anything in that
Test Bed - or start a new topic if you prefer within the sandbox.

Most grateful for any assistance.

Apologies - can't seem to subvert the inactive link. Hopefully it's obvious...
Title: Re: Very strange smiley performance following upgrade
Post by: Sir Osis of Liver on December 25, 2021, 10:49:46 PM
Will be offline til late tomorrow, if no one else gets to it will take a look.  Have you tried uninstalling 2.0.19 patch?
Title: Re: Very strange smiley performance following upgrade
Post by: Roger2 on December 25, 2021, 11:47:35 PM
Quote from: Sir Osis of Liver on December 25, 2021, 10:49:46 PMWill be offline til late tomorrow, if no one else gets to it will take a look.  Have you tried uninstalling 2.0.19 patch?
Thanks for your continued help. No - didn't realise one could go backwards - I'll do that now if I can see how.......  Right, did that - it now says 2.0.18 at the bottom - and I think it's better.  I'll see if I can now uninstall 2.0.18..... Yes I can :-)  And it is definitely better in both 2.0.18 and 2.0.17.

Reinstalling just 2.0.18 - all seems to work fine.

Reinstalling 2.0.19 - and the problem recurs.

I'll leave it at 2.0.19 for a day or so lest it help you with diagnosis of something esoteric for the greater good. However, I can revert to 2.0.18 to restore full emoticon functionality which I will do in a day or so unless there's a compelling reason not to.

Two consecutive posts on my forum - infuriatingly by fluke one at the bottom of a page and the next at the top of the following page. The first - http://www.oiltechs.org/forum/index.php?topic=2317.msg29300#msg29300 - was made at 2.0.18, all required icons present and correct (it is simply a text copy of a chunk of the admin emoticon edit page).  The second - https://www.oiltechs.org/forum/index.php?topic=2317.msg29301#msg29301 - identical at composition stage - was made at 2.0.19. If you "quote" either, apart from the date credentials in the quote link, the text to parse is identical.

Title: Re: Very strange smiley performance following upgrade
Post by: Dave J on December 26, 2021, 06:02:04 AM
The way I see it you need to remove all the inverted commas from the either the 'filename' or 'tooltip description' by modifying the smiley and see if that works. See the screenshot below you'll see none of them have any commas


smileys.PNG
Title: Re: Very strange smiley performance following upgrade
Post by: Roger2 on December 26, 2021, 07:30:29 AM
Quote from: Dave J on December 26, 2021, 06:02:04 AMThe way I see it you need to remove all the inverted commas from the either the 'filename' or 'tooltip description' by modifying the smiley and see if that works. See the screenshot below you'll see none of them have any commas


smileys.PNG
Will that render smileys in existing posts fugitive? If so I'd prefer to stick at 2.0.18 and log as a bug.
Title: Re: Very strange smiley performance following upgrade
Post by: Steve on December 26, 2021, 08:57:57 AM
What are inverted commas? Apostrophes?

@Roger2 - yes it would
Title: Re: Very strange smiley performance following upgrade
Post by: Roger2 on December 26, 2021, 10:38:26 AM
Quote from: Steve on December 26, 2021, 08:57:57 AMWhat are inverted commas? Apostrophes?

@Roger2 - yes it would

Could I duplicate but hide the ones in speech marks to cover all bases? Still seems like a bug to me.
Title: Re: Very strange smiley performance following upgrade
Post by: shawnb61 on December 26, 2021, 01:04:27 PM
Can you share some examples of which smileys work & which don't?  Screenshots of examples that work & ones that don't would help identify a pattern.

I am also wondering about the 'enclosed in quotes' - where are you seeing that?  A screenshot there would help, too.  I don't see smiley codes enclosed in quotes anywhere...

Sounds like you have a lot of custom smileys?  Are the standard ones working?

No, this is not a known issue.  (However, I do see an issue with the cry smiley atm...)
Title: Re: Very strange smiley performance following upgrade
Post by: Dave J on December 26, 2021, 05:11:54 PM
Quote from: Steve on December 26, 2021, 08:57:57 AMWhat are inverted commas? Apostrophes?

@Roger2 - yes it would


 Inverted commas are punctuation marks that are used in writing to show where speech or a quotation begins and ends. They are usually written or printed as ' ' or " ". Inverted commas are also sometimes used around the titles of books, plays, or songs, or around a word or phrase that is being discussed.
Title: Re: Very strange smiley performance following upgrade
Post by: Steve on December 26, 2021, 05:16:16 PM
I know what they are. I was being a little facetious. Apostrophes and inverted commas are the same thing. :)
Title: Re: Very strange smiley performance following upgrade
Post by: Dave J on December 26, 2021, 05:17:05 PM
Quote from: shawnb61 on December 26, 2021, 01:04:27 PMCan you share some examples of which smileys work & which don't?  Screenshots of examples that work & ones that don't would help identify a pattern.

I am also wondering about the 'enclosed in quotes' - where are you seeing that?  A screenshot there would help, too.  I don't see smiley codes enclosed in quotes anywhere...

Sounds like you have a lot of custom smileys?  Are the standard ones working?

No, this is not a known issue.  (However, I do see an issue with the cry smiley atm...)

Shawn, in one of the OP's posts there is a link to his site and a temp log in which is what I used to see the post with the smileys in 'inverted commas'.

It should be noted that as per my previous post to Steve they are called many things, I just know sinlge marks like '' as inverted commas and "" are speech marks, sorry if that was confusing anyone.
Title: Re: Very strange smiley performance following upgrade
Post by: Dave J on December 26, 2021, 05:17:24 PM
Quote from: Steve on December 26, 2021, 05:16:16 PMI know what they are. I was being a little facetious. Apostrophes and inverted commas are the same thing. :)

 ;D  ;)
Title: Re: Very strange smiley performance following upgrade
Post by: Roger2 on December 26, 2021, 05:21:34 PM
Quote from: shawnb61 on December 26, 2021, 01:04:27 PMCan you share some examples of which smileys work & which don't?  Screenshots of examples that work & ones that don't would help identify a pattern.
I endeavoured to do that in the posts I (attempted to) link to in my earlier message (https://www.simplemachines.org/community/index.php?msg=4105655). However, with the help of clipboard and a bit of cloud space I cam likely show more explicitly.

Firstly, a screenshot from the admin "edit smileys" page. That shows a large number of personalised smileys, all of which work as expected in 2.0.18 and earlier. Two images at different scroll points in a long list.

Can't seem to make the IMG tag work - so including the image links in code quotes to easr copy/paste.

[img]https://drive.google.com/file/d/1QaZazdRNdTOUrj3P_5VpQXpxHSTXz15M/view?usp=sharing[/img]
[img]https://drive.google.com/file/d/1jsMV5buLYuK8ctkimPM8T888AmInVrVG/view?usp=sharing[/img]

You will see that many of these smiley texts are bookended by colons, eg:
:spoon:
:tongue:
:undecided:
These all seem to work in 2.0.19 as well.

Some are bookended by inverted commas/single speech marks/apostrophes (sorry for confusion - all mean the same character - the one to the right of the semicolon on the keyboard, eg:
'Applause'
'Confused'
'Cool shades'
'Cuppa'
'thank you'
'Think'
None of these parse when posted in 2.0.19 - although if posted in 2.0.18 or earlier, they parse and appear - and continue to show in these posts after upgrading to 2.0.19 - although if "quoted", they no longer render.

Still other smileys are not bookended at all, eg:
Thumbs Up
Bang Head
Head Spin
Laughing
These all seem to work in 2.0.19

I thus conclude that Smileys whose post token is bookended with apostrophes do not parse when posting in 2.0.19, though legacy posts continue to display them correctly (even after clearing cache)

Quote from: shawnb61 on December 26, 2021, 01:04:27 PMI am also wondering about the 'enclosed in quotes' - where are you seeing that?  A screenshot there would help, too.  I don't see smiley codes enclosed in quotes anywhere...
Sorry I must've explained myself badly, hopefully the above clears this up?

Quote from: shawnb61 on December 26, 2021, 01:04:27 PMSounds like you have a lot of custom smileys?  Are the standard ones working?

No, this is not a known issue.  (However, I do see an issue with the cry smiley atm...)

Yes there are a lot of custom smileys - created at various times by co-administrators. Yes they all should be colon bookeneded for consistency, but they aren't - and I am loathe to modify them as it will leave legacy posts with unconvolved smileys.

It would be good if this were fixable, but for now I think I have to wind back to 2.0.18 (but will leave matters in abeyance for a few more hours).

Edit: While I composed the above I see Dave has explained things better than I did.
Title: Re: Very strange smiley performance following upgrade
Post by: shawnb61 on December 26, 2021, 05:52:26 PM
So, in a word, the problem is apostrophies:
 - All smilies with apostrophies in the code fail.
 - All smilies without apostrophies work.

Is this correct?

(For most folks, this just means the cry smiley fails.)
Title: Re: Very strange smiley performance following upgrade
Post by: Roger2 on December 26, 2021, 06:00:07 PM
Quote from: shawnb61 on December 26, 2021, 05:52:26 PMSo, in a word, the problem is apostrophies:
 - All smilies with apostrophies in the code fail.
 - All smilies without apostrophies work.

Is this correct?

(For most folks, this just means the cry smiley fails.)
Yes - but the fail is not complete (hence the title "very strange"). Previously posted apostrophe-clad smileys continue to render correctly, but no longer do so when quoted.

Edit: Wasn't there a change to a translation table in this upgrade - could they have "translated" Ascii character 039 to something else that looks the same, like Word does to giver it a slope - eg Ascii 239? ยด '
Title: Re: Very strange smiley performance following upgrade
Post by: shawnb61 on December 26, 2021, 06:04:25 PM
Yep, perfect.  And yep, it's a bug.

Appears to only impact smilies, and specifically smilies that use apostrophies in the code.  For most of us, that's just the cry smiley.

Logged internally, #254
Title: Re: Very strange smiley performance following upgrade
Post by: Roger2 on December 26, 2021, 06:06:51 PM
Brilliant - feel free to mark this as closed. I'm going to revert to 2.0.18 - perhaps one of you would be kind enough to drop something in my Sandbox when it's safe to upgrade?

Not sure if I need to earn trust, but the ability to drop in hyperlinks or img references would have been helpful to both you and me here. If there is a flag you can set in my profile, I'd appreciate it. At least I'm no longer plagued with increasingly difficult-to-read Captchas!
Title: Re: Very strange smiley performance following upgrade
Post by: Roger2 on December 26, 2021, 06:15:46 PM
ok - final clue... if a (failed-to-parse) post made in 2.0.19 is edited after removal of the 2.0.19 upgrade, the smileys return - blowing the translation table theory I had out of the water!

Over to you guys"
Title: Re: Very strange smiley performance following upgrade
Post by: Kindred on December 26, 2021, 09:53:36 PM
Quote from: Dave J on December 26, 2021, 05:11:54 PM
Quote from: Steve on December 26, 2021, 08:57:57 AMWhat are inverted commas? Apostrophes?

@Roger2 - yes it would


 Inverted commas are punctuation marks that are used in writing to show where speech or a quotation begins and ends. They are usually written or printed as ' ' or " ". Inverted commas are also sometimes used around the titles of books, plays, or songs, or around a word or phrase that is being discussed.

In english, those are called apostrophes or quote marks
Title: Re: Very strange smiley performance following upgrade
Post by: Sir Osis of Liver on December 26, 2021, 10:03:15 PM
Just back on, thought it was a bug.  When you get to 10 posts you're treated as a normal member, not a spammer.
Title: Re: Very strange smiley performance following upgrade
Post by: GL700Wing on December 26, 2021, 10:55:40 PM
Quote from: Roger2 on December 26, 2021, 06:06:51 PMNot sure if I need to earn trust, but the ability to drop in hyperlinks or img references would have been helpful to both you and me here. If there is a flag you can set in my profile, I'd appreciate it. At least I'm no longer plagued with increasingly difficult-to-read Captchas!
Those anti-spam measures disappear as your valid post count (ie, messages posted in boards that increase your post count) increases ...
Title: Re: Very strange smiley performance following upgrade
Post by: Dave J on December 27, 2021, 02:07:08 AM
Quote from: Kindred on December 26, 2021, 09:53:36 PM
Quote from: Dave J on December 26, 2021, 05:11:54 PM
Quote from: Steve on December 26, 2021, 08:57:57 AMWhat are inverted commas? Apostrophes?

@Roger2 - yes it would


 Inverted commas are punctuation marks that are used in writing to show where speech or a quotation begins and ends. They are usually written or printed as ' ' or " ". Inverted commas are also sometimes used around the titles of books, plays, or songs, or around a word or phrase that is being discussed.

In english, those are called apostrophes or quote marks

I am very English as I live in England and was born here,  maybe you mean American English  ;D

The definition came from the Cambridge dictionary
Title: Re: Very strange smiley performance following upgrade
Post by: Steve on December 27, 2021, 09:47:50 AM
As the problem has been identified and logged, closing this.
Title: Re: Very strange smiley performance following upgrade
Post by: Kindred on December 27, 2021, 09:55:11 AM
Quote from: Dave J on December 27, 2021, 02:07:08 AMI am very English as I live in England and was born here,  maybe you mean American English  ;D

The definition came from the Cambridge dictionary

I think you've got a regional/dialect, even in England, since the majority of British people that I know still call them Apostrophes and Quotes. :)
Title: Re: Very strange smiley performance following upgrade
Post by: Roger2 on December 27, 2021, 09:57:26 AM
Trying to prevent speculation here - it's a generation thing. I'm knocking on now and use all. A bit like using "foil" for slide - evolution.
Title: Re: Very strange smiley performance following upgrade
Post by: Kindred on December 27, 2021, 10:07:33 AM
ah, generational... yeah, that makes sense. :)

most of the brits that I associate with are in their 40s-60s at this point.
Title: Re: Very strange smiley performance following upgrade
Post by: Roger2 on December 27, 2021, 11:02:24 AM
Just to add to the new topic on punctuation marks, the single raised comma is always called an apostrophe when used to define an abbreviation or used to depict genitive case. Examples:

We've ... Roger's topic...

The term inverted commas whether single or double was coined because when quoting speech they should be used in pairs, and the opening one is not only superscript but when printed accurately should be truly upside down, i.e. tail(s) up and blob(s) at the bottom.
Title: Re: Very strange smiley performance following upgrade
Post by: shawnb61 on December 27, 2021, 12:42:49 PM
And with that post, Roger2, you are now formally inducted into the SMF community - with special honors into the silly tangent division.


(Plus, I think your post count is now high enough...)
Title: Re: Very strange smiley performance following upgrade
Post by: Roger2 on December 27, 2021, 12:44:37 PM
Quote from: shawnb61 on December 27, 2021, 12:42:49 PMAnd with that post, Roger2, you are now formally inducted into the SMF community - with special honors into the silly tangent division.


(Plus, I think your post count is now high enough...)
8)
Title: Re: Very strange smiley performance following upgrade
Post by: Kindred on December 27, 2021, 02:46:09 PM
That's possible after 10 posts.
Title: Re: Very strange smiley performance following upgrade
Post by: Dave J on December 31, 2021, 05:30:58 AM
Quote from: shawnb61 on December 27, 2021, 12:42:49 PMwith special honors into the silly tangent division.
(https://www.quizland.co.uk/Smileys/dave/rofl.gif)

Title: Re: Very strange smiley performance following upgrade
Post by: Wellwisher on January 01, 2022, 08:07:00 PM
Quote from: shawnb61 on December 26, 2021, 06:04:25 PMYep, perfect.  And yep, it's a bug.

Appears to only impact smilies, and specifically smilies that use apostrophies in the code.  For most of us, that's just the cry smiley.

Logged internally, #254

Apologies to resurrect a solved thread.  I have the same issue. My crying emoji doesn't phase. The rest of them work.

Emoji's that don't have apostrophes work as normal. Confirmed.  :P

For example my crying emoji is and this doesn't work:


:')

Title: Re: Very strange smiley performance following upgrade
Post by: Arantor on January 01, 2022, 08:32:04 PM
When you're posting, is it via quick reply or full reply?
Title: Re: Very strange smiley performance following upgrade
Post by: Roger2 on January 01, 2022, 09:30:04 PM
On my board I don't have quick reply enabled - at least I don't think I do.
Title: Re: Very strange smiley performance following upgrade
Post by: Dave J on January 02, 2022, 03:10:39 AM
Quote from: Wellwisher on January 01, 2022, 08:07:00 PM
Quote from: shawnb61 on December 26, 2021, 06:04:25 PMYep, perfect.  And yep, it's a bug.

Appears to only impact smilies, and specifically smilies that use apostrophies in the code.  For most of us, that's just the cry smiley.

Logged internally, #254

Apologies to resurrect a solved thread.  I have the same issue. My crying emoji doesn't phase. The rest of them work.

Emoji's that don't have apostrophes work as normal. Confirmed.  :P

For example my crying emoji is and this doesn't work:


:')


Go to Admin>Forum>Smileys and Message Icons

If not done already go to Settings and tick the box for 'Enable customized smileys' click on 'Save'

Now you will see that there are new options in the heading. Click on 'Edit Smileys' then scroll down to the 'cry'  smiley and click on 'Modify' on the right hand side.

In the box that opens change the code to  :c( click on 'Save Changes'and see if that works OK. Check to see you don't have any other smileys with that code.
Title: Re: Very strange smiley performance following upgrade
Post by: Roger2 on January 02, 2022, 05:08:33 AM
Quote from: Dave J on January 02, 2022, 03:10:39 AMGo to Admin>Forum>Smileys and Message Icons

If not done already go to Settings and tick the box for 'Enable customized smileys' click on 'Save'

Now you will see that there are new options in the heading. Click on 'Edit Smileys' then scroll down to the 'cry'  smiley and click on 'Modify' on the right hand side.

In the box that opens change the code to  :c( click on 'Save Changes'and see if that works OK. Check to see you don't have any other smileys with that code.
Is this the proposed work-around? If so it leaves me behind big time  :'(

I have just used the "cry" emoticon from the presented row. It embeds an apostrophe - and parses perfectly. Is the real fix included in here or is this forum somehow immune?
Title: Re: Very strange smiley performance following upgrade
Post by: Wellwisher on January 02, 2022, 06:29:14 AM
Quote from: Arantor on January 01, 2022, 08:32:04 PMWhen you're posting, is it via quick reply or full reply?

@Arantor I tested it on both. It doesn't work on both types of replies.

@Dave J Thank you. It's good to know there's a work around temporarily.
Title: Re: Very strange smiley performance following upgrade
Post by: Dave J on January 02, 2022, 08:23:20 AM
Quote from: Roger2 on January 02, 2022, 05:08:33 AM
Quote from: Dave J on January 02, 2022, 03:10:39 AMGo to Admin>Forum>Smileys and Message Icons

If not done already go to Settings and tick the box for 'Enable customized smileys' click on 'Save'

Now you will see that there are new options in the heading. Click on 'Edit Smileys' then scroll down to the 'cry'  smiley and click on 'Modify' on the right hand side.

In the box that opens change the code to  :c( click on 'Save Changes'and see if that works OK. Check to see you don't have any other smileys with that code.
Is this the proposed work-around? If so it leaves me behind big time  :'(
 Is the real fix included in here or is this forum somehow immune?

The post I made was to help out Wellwisher who only quoted one smiley not working.

It's also worth noting that this forum uses SMF2.1 and therefore might have some coding that's different to what you're using in 2.0.19.
Title: Re: Very strange smiley performance following upgrade
Post by: weus on January 03, 2022, 09:42:06 AM
Quote from: shawnb61 on December 26, 2021, 06:04:25 PMYep, perfect.  And yep, it's a bug.

Appears to only impact smilies, and specifically smilies that use apostrophies in the code.  For most of us, that's just the cry smiley.

Logged internally, #254

To add to this issue, on our forum, it also happens when using code formatting like

Code (foo) Select
'some quoted text'

it gets rendered like:

'some quoted text'



Title: Re: Very strange smiley performance following upgrade
Post by: Dave J on January 03, 2022, 10:11:53 AM
Quote from: weus on January 03, 2022, 09:42:06 AM
Quote from: shawnb61 on December 26, 2021, 06:04:25 PMYep, perfect.  And yep, it's a bug.

Appears to only impact smilies, and specifically smilies that use apostrophies in the code.  For most of us, that's just the cry smiley.

Logged internally, #254

To add to this issue, on our forum, it also happens when using code formatting like

Code (foo) Select
'some quoted text'

it gets rendered like:

'some quoted text'

The code 39 is ASCII for the apostrohphe but instead of being rendered as ' it's give the code for it.
Title: Re: Very strange smiley performance following upgrade
Post by: Arantor on January 03, 2022, 10:37:40 AM
This would imply that there is a second layer of encoding going on - one layer is normal, two is not.

This is also why I asked about quick reply vs normal reply because there's definitely been issues historically about full reply and quick reply handling such things differently.
Title: Re: Very strange smiley performance following upgrade
Post by: weus on January 03, 2022, 10:44:54 AM
Quote from: Dave J on January 03, 2022, 10:11:53 AMThe code 39 is ASCII for the apostrohphe but instead of being rendered as ' it's give the code for it.

I know. Our forum is about software development, so the code formatting tags are used a lot in code samples.
Strings are delimited by an apostrohphe and are rendered useless this way

Marc
Title: Re: Very strange smiley performance following upgrade
Post by: shawnb61 on January 03, 2022, 10:51:56 AM
Quote from: weus on January 03, 2022, 10:44:54 AMI know. Our forum is about software development, so the code formatting tags are used a lot in code samples.
Strings are delimited by an apostrohphe and are rendered useless this way

Marc


Marc - I cannot reproduce this.  (Though I can reproduce the cry smiley issue.)

Php version? Is the forum utf8? Are other bbc codes impacted, or only the code bbc?
Title: Re: Very strange smiley performance following upgrade
Post by: weus on January 03, 2022, 11:20:55 AM
We were running 2.0.18 without problems. On Dec 24 I updated the forum to 2.0.19 and last week I got user reports that the code formatting was broken. Older posts are not affected.
It only happens when using code=you_name_it tags are used (any value triggers it). A plain code tag renders ok.
php version is 5.6.40
to render different code languages we use cb|GeSHi-mod 1.2
site: forum.lazarus.freepascal.org
example: https://forum.lazarus.freepascal.org/index.php/topic,57672.0.html

Thanks Marc


Title: Re: Very strange smiley performance following upgrade
Post by: weus on January 03, 2022, 11:34:58 AM
From a little analyze I did before I came here:

The only relevant change of the update seems to be in Load.php.

The update replaces
  $string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string);
with
  $string = preg_replace_callback('~(&' . (!empty($double) ? '(?:amp;)?' : '') . '#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string);

in the new case, depending on the value of $double, the expression is either
  $string = preg_replace_callback('~(&(?:amp;)?#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string);
or
  $string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string);

Now I'm not a regex king, so I don't know if the true part is the same as the old code, but textual they differ.

Marc
 
Title: Re: Very strange smiley performance following upgrade
Post by: shawnb61 on January 03, 2022, 12:29:42 PM
I am not seeing that behavior anywhere.  I've tried php 8, php 7 & php 5.6.  All under 2.0.19.  Screenshot below.

The root of the cry smiley issue is that the entities are being stored slightly differently - ' vs '.  Outside of smileys, we aren't seeing issues, as both versions are valid.

But anywhere you have code that parses this byte-by-byte, such as the smiley code, must now account for either ' or '.

Are you sure the issue isn't your mod?  Can you try it without your mod?

Do your code=you_name_it tags identify the language?
Title: Re: Very strange smiley performance following upgrade
Post by: shawnb61 on January 03, 2022, 03:44:14 PM
The code= issue is definitely related to the mod. 

It completely rewrote the code= logic being invoked here.  I suspect the fix will be simple, but should likely be discussed here, so other folks who use the mod can benefit:
https://www.simplemachines.org/community/index.php?topic=440609.0

Note this mod hasn't been able to install clean for a while.
Title: Re: Very strange smiley performance following upgrade
Post by: Wellwisher on January 03, 2022, 09:13:40 PM
I don't know if this helps but a month ago I had to run "Convert HTML-entities to UTF-8 characters". As my members complained that they could no longer "copy & paste" large texts from random webpages on the internet into a post. They said, once they pasted the large snippet of text and clicked on post, only the first sentence would show in the post. However if the members typed the full texted in, the forum would save it.

That's when I did a bit of googling and found running the following SMF task: "Convert HTML-entities to UTF-8 characters" solved the issue.
Once this was done, members were able to copy and paste texts from other websites into the forum. However some of the words in the titles and body which were already posted were changed/ converted into the weird symbols.
Title: Re: Very strange smiley performance following upgrade
Post by: Roger2 on January 04, 2022, 12:29:07 AM
QuoteIt's also worth noting that this forum uses SMF2.1 and therefore might have some coding that's different to what you're using in 2.0.19.
That explains a lot.

How easy would it be for me to import lock stock and barrel my whole forum into a vanilla 2.1? Or would that create more problems than it would solve? I hasten to add I'd be on my own as the GoDaddy Control Panel easy-install is at v2.0.18
Title: Re: Very strange smiley performance following upgrade
Post by: weus on January 04, 2022, 05:01:30 AM
Quote from: shawnb61 on January 03, 2022, 03:44:14 PMThe code= issue is definitely related to the mod. 

It completely rewrote the code= logic being invoked here.  I suspect the fix will be simple, but should likely be discussed here, so other folks who use the mod can benefit:
https://www.simplemachines.org/community/index.php?topic=440609.0

Note this mod hasn't been able to install clean for a while.

We've been using this mod since the early days of our forum (smf 1.0 or something like that). So we didn't need to install it for a while.

Anyway I'll continue on the other topic (or we'll switch to another highlighter)

Thanks Marc
Title: Re: Very strange smiley performance following upgrade
Post by: Turrican3 on March 23, 2022, 10:18:27 AM
I'm experiencing the exact same issue after upgrading to 2.0.19 (was on 2.0.18 until yesterday), the "cry" emoticon doesn't get parsed in posts, but it does when quoted.

The aforementioned mod though is NOT installed on my forum... any suggestions/fix? If possible, I'd happily keep the emoticon code so that existing post won't break, but if it's too complex I suppose I'll just accept it.
Title: Re: Very strange smiley performance following upgrade
Post by: Turrican3 on March 25, 2022, 04:50:13 AM
Ok just upgraded to SMF 2.1.1 and the smiley is working again as intended. :D