Ticket #1234 (closed unconfirmed defect: fixed)

Opened 6 months ago

Last modified 7 weeks ago

Simplecache on causes problems with certain characters (was: Certain characters break profile photo in Elgg 1.6.1)

Reported by: tomv Owned by:
Priority: high Milestone: Elgg 1.7
Component: Core Version: 1.6
Severity: major Keywords: simplecache, profile
Cc: brettp, dave

Description

As described in  http://community.elgg.org/mod/groups/topicposts.php?topic=259752&group_guid=212067

Users with a "." in their user name can not see, upload or change their profile photo.

For example we have usernames like:

# ...pg/profile/em.van.buuren # ...pg/profile/gpm.huijgen # ...pg/profile/j.repping@…

And they all break. Seen in 1.5, 1.6 and 1.6.1

Attachments

checkphp.php.htm Download (50.5 KB) - added by tomv 6 months ago.
PHPInfo of production server

Change History

  Changed 6 months ago by tomv

Temporarly patch to avoid wrong usernames in the system:

in ..\engine\lib\users.php , I commented out line 1142-1160 and instead:

// Patch by TVld
if(preg_replace('/[a-zA-Z0-9]/', '', $username) )
   throw new RegistrationException(elgg_echo('registration:invalidchars'));

  Changed 6 months ago by brettp

I cannot duplicate this error. It has been reported by another user, so it must happen under certain server configurations. Please provide details about your server and php settings.

  Changed 6 months ago by tomv

Hm, as long as the other user is not me and myself ;)

It happened on our hosted production and we easily replicated on our testserver ubuntu 8.1. Complete different OS/PHP setups but both Elgg 1.6.1. Attached the phpinfo of the production server.

Have you tried to create a new user with username "th.isname" ? If we do, we can not upload a profile photo. If you can, it must be a plugin causing the trouble?... any clue which one it might be..?

Changed 6 months ago by tomv

PHPInfo of production server

  Changed 6 months ago by darkwingduck

on test server, just disable all 3rd party addons, then try it enabling one addon each time, so you can find out which addon makes the problem, if it's an addon.

  Changed 6 months ago by tomv

@ dduck: of course; all users should rule out plugin causes before submitting to track.

What we did is:

1- disable *all* plugins and then just enable the profile plugin, as that is min to test upload of photo. 2 - Create user with username "ja.ntje" 3- and guess what, again no photo upload possible.

Remember this only happens in 1.6 and 1.6.1 With 1.5 all was ok. I replicated this successfully on 3 different servers; including 2 clean installs.

No, guys, regular bug in the core.

  Changed 6 months ago by tomv

  • status changed from new to closed
  • resolution set to invalid

Seems an viewcache issue... deleting the directory and in the site settings viewcache, we have some progress...

  Changed 6 months ago by tomv

It seems a cache issue. Can simplecache/viewcache stumble over "." in usernames ???

  Changed 6 months ago by tomv

Simplecache - off - all is fine / Simple cache on: users with "." in their usernames have problems

  Changed 6 months ago by brettp

  • keywords simplecache, profile added
  • status changed from closed to reopened
  • resolution invalid deleted
  • summary changed from Certain characters break profile photo in Elgg 1.6.1 to Simplecache on causes problems with certain characters (was: Certain characters break profile photo in Elgg 1.6.1)

Reopening this with a different title so it doesn't get lost. Thanks for all the investigating everyone!

  Changed 6 months ago by cash

I can't see how this has anything to do with simplecache (that is the profile photos disappearing). revision 3329 caused this by changing the filestore path of users who have a . in their usernames.

  Changed 6 months ago by c.west

We are seeing the exact same problem. All usernames with a '.' in them (most of them in our case) lose and cannot change their profile icon with simplecache on. Switching it off cures the problem.
Also, Group icons disappeared.

  Changed 6 months ago by c.west

...and uploaded files that are images have disappeared also. Other files are fine. These haven't returned after simplecache is turned off

  Changed 6 months ago by koskos

The same problem, also all files uploaded before upgrade to 1.6.1 are unavailable.

And I suppose that 1.6.1 interprets logins differently than 1.5. In 1.5 there were l, o, g, i, n folders, but in 1.6 the dot got a “_” sign, so the folders are: l, o, g, _, i, n . That’s why the files that used to be uploaded are not available for me.

(I described that here:  https://trac.elgg.org/elgg/ticket/1260)

  Changed 6 months ago by brettp

I have a solution to this but need someone using Windows to answer a few questions. Is anyone using Elgg on Windows in this thread?

  Changed 6 months ago by darkwingduck

Just shoot it, so someone who does can answer. I use windows but currently have some urgent stuff to deal with. I can answer too, when I have some time to breathe and install 1.6.

  Changed 6 months ago by brettp

From a Windows user who has this problem and either migrated to 1.6 OR is still running 1.5 I need:[BR] *A full list of their data directory *A full list of their users *The type of FS their data directory is on.

  Changed 6 months ago by cash

We had the issue on Linux with file system ext3.

  Changed 6 months ago by brettp

Yes, this problem will exist in any 1.5 -> 1.6 migration, but I need to know how Windows dealt with the original directory structure in order to write a migration script. Linux-based system silently failed when trying to create a dir with an invalid character. I don't know if Windows will react the same, so I need to test the data migration script on a Windows source to make sure there is no data loss.

  Changed 6 months ago by brettp

  • cc marcus removed

Please test the solution tagged as 1.6.2 in SVN at  http://code.elgg.org/elgg/releases/core/elgg1.6.2/

I'm holding off releasing this until I get some feedback about migrations from more users than me.

  Changed 6 months ago by cash

We had already fixed it in our version. Sorry :(

follow-up: ↓ 22   Changed 6 months ago by tomv

in reply to: ↑ 21   Changed 6 months ago by tomv

Ignore that please... Tortoise tricked me

  Changed 7 weeks ago by brettp

  • status changed from reopened to closed
  • resolution set to fixed

This should be fixed with the 2009102801 code update.

Note: See TracTickets for help on using tickets.