We have moved to Github. Please open tickets there.

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#1234 closed Defect (fixed)

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, Difficulty:

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 (1)

checkphp.php.htm (50.5 KB) - added by tomv 4 years ago.
PHPInfo of production server

Download all attachments as: .zip

Change History (24)

comment:1 Changed 4 years 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'));

comment:2 Changed 4 years 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.

comment:3 Changed 4 years 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 4 years ago by tomv

PHPInfo of production server

comment:4 Changed 4 years 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.

comment:5 Changed 4 years 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.

comment:6 Changed 4 years ago by tomv

  • Resolution set to invalid
  • Status changed from new to closed

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

comment:7 Changed 4 years ago by tomv

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

comment:8 Changed 4 years ago by tomv

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

comment:9 Changed 4 years ago by brettp

  • Keywords simplecache, profile added
  • Resolution invalid deleted
  • Status changed from closed to reopened
  • 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!

comment:10 Changed 4 years 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.

comment:11 Changed 4 years 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.

comment:12 Changed 4 years 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

comment:13 Changed 4 years 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)

comment:14 Changed 4 years 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?

comment:15 Changed 4 years 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.

comment:16 Changed 4 years 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.

comment:17 Changed 4 years ago by cash

We had the issue on Linux with file system ext3.

comment:18 Changed 4 years 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.

comment:19 Changed 4 years 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.

comment:20 Changed 4 years ago by cash

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

comment:21 follow-up: Changed 4 years ago by tomv

comment:22 in reply to: ↑ 21 Changed 4 years ago by tomv

Ignore that please... Tortoise tricked me

comment:23 Changed 3 years ago by brettp

  • Resolution set to fixed
  • Status changed from reopened to closed

This should be fixed with the 2009102801 code update.

Note: See TracTickets for help on using tickets.