Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smileys - user profile issue #4920

Closed
sbulen opened this issue Aug 15, 2018 · 12 comments
Closed

Smileys - user profile issue #4920

sbulen opened this issue Aug 15, 2018 · 12 comments

Comments

@sbulen
Copy link
Contributor

sbulen commented Aug 15, 2018

In 2.0, my default is the forum default, which is represented as an empty field in the members table. (Note that in 2.0 & 2.1, 'No smileys' is represented as 'none' in the DB.)

Post upgrade, in 2.1, an empty value in the members table is now represented as "no smileys" and a broken icon appears:
smileys-post-upgr-nosmileys-prob

@NanoSector
Copy link
Contributor

I cannot reproduce this by setting smiley_set to a blank value. Setting it to a random value that certainly doesn't exist sets the dropdown to the Fugue option with a broken icon, however.

Can you check the value in your database?

@sbulen
Copy link
Contributor Author

sbulen commented Aug 15, 2018

Yes, confirmed.

The exact steps:

  • fresh 2.0.15 install
  • custom smiley set installed (classic)
  • forum default set to classic
  • upgraded to 2.1
  • navigated to user profile, look & feel

No user maint prior.

Chrome browser.

@sbulen
Copy link
Contributor Author

sbulen commented Aug 16, 2018

If I clear it out (e.g., using phpmyadmin), and use chrome, the above is easily reproduced.

If I use Firefox, the behavior is different. Text smileys are displayed instead of broken icon links.

In either browser, if I select 'forum default' what gets stored is 'classic', the forum default. It doesn't empty it out like it should.

@NanoSector
Copy link
Contributor

I changed the latter behavior with my smiley preview pr. However I still can't reproduce the other behavior in Firefox.

@wintstar
Copy link

wintstar commented Aug 16, 2018

Check the Database entry in table prefix_themes. Is the variable with the name of the smileyset with saved with 'cust_x' (sample cust_fugue)? In my database saved a smiley set with added with 'cust_' before the name of the smileyset. Only after I removed cust_ the smileyset was displayed. It can could only have happened with my upgrade from 2.0.15 to 2.1 beta 4. But maybe it will help.

x the name of the smileyset

@sbulen
Copy link
Contributor Author

sbulen commented Aug 16, 2018

No prefixes here. Sounds like a mod?

@wintstar
Copy link

wintstar commented Aug 16, 2018

it is the standard table themes. With prefix i mean smf_ . I don't know if you use the same prefix. Before the test upgrade I uninstalled all mods and other themes.

@sbulen
Copy link
Contributor Author

sbulen commented Aug 17, 2018

@wintstar - I see no smiley settings in my themes table, either on a fresh 2.1 install or on a 2.0.15 => 2.1 upgrade. I have no themes intalled other than the normal default one in these environments. Maybe a screenshot would help?

@sbulen
Copy link
Contributor Author

sbulen commented Aug 17, 2018

@Yoshi2889 - I am running current code as of now. I just installed a fresh 2.1 copy, and it exhibits the same behavior.

Upon install, my smiley setting is blank:
fresh-install-wamp-smiley

If I go to the profile, look and feel screen in Chrome or Firefox it looks like:
fresh-install-wamp-prof-smiley-chrome

If I install a .gif-based smiley set & make it default, and go back to look-n-feel:
fresh-install-wamp-prof-smiley-firefox-defgif
If you save your setting as 'forum default', it saves the current default value, not blanks:
fresh-install-wamp-prof-smiley-chrome-defgif

There are 3 minor issues, as I see it:

  • It is erroneously displaying 'no smileys' as your default when it should indicate you are using the forum default
  • Upon initial page load, if you have a .gif-based smiley set, it is displayed as either a broken link or as alt-text, but not the .gif smiley. (Yes - it works fine if you select items - after - the intitial page load.)
  • You can't actually set yourself to 'forum default' (blank) anymore. It inserts & stores the name of the current default smileyset.

Firefox handles this slightly better - the .gif is displayed as text instead of a broken link.

@sbulen
Copy link
Contributor Author

sbulen commented Aug 17, 2018

The first and 3rd issues above are both due to change to this line:
https://github.com/SimpleMachines/SMF2.1/blob/9abd097f15550e7b505add14a0596704af15f52f/Sources/Profile-Modify.php#L464

I don't know how to address the 2nd bullet, the initial page load issue. Maybe we need an onload in there, since the js won't otherwise just run on its own?

@sbulen
Copy link
Contributor Author

sbulen commented Aug 17, 2018

I am testing a fix for this. Will submit a PR shortly.

@wintstar
Copy link

No, I don't have a screenshot. But I will check it again today and upgrade a test forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants