Arrow Home arrow Forums
larger font smaller font default font Fixed screen resolution Auto adjust screen size

Joomlapolis Forums  


<< Start < Prev 1 2 Next > End >>
17: profile does not exists if username has hyphen
Date: 2008/08/20 23:06 By: amazeika Status: CB Doc subscriber  
Karma: 0  
Fresh Joomlapolitan

Posts: 14
graphgraph
I just got this error an hour ago, a user registered and his profile cannot be reached. I got the profile does not exist message.

I noticed that this is the only user with an inaccessible profile and he is the only one with an hyphen (-) on his username. I created a user with an hyphen, same problem. I tried to find a solution but it seems there is none at this moment.

I also notice that if I disable the SEF, his profile can be reached using the link provided by the list. Disabling SEF is not a solution for me. Could anybody help me please?. I'm running Joomla 1.5.3 and CB RC2.

Thx

Edit: added number to subject

Post edited by: beat, at: 2008/08/25 23:28
Click here to see the profile of this user The topic has been locked.

Re:profile does not exists if username has hyphen
Date: 2008/08/21 11:47 By: amazeika Status: CB Doc subscriber  
Karma: 0  
Fresh Joomlapolitan

Posts: 14
graphgraph
at least, in the meantime, is there an easy way (some code modification) to prevent users from choosing usernames with hyphens or characters that may lead to this error. I just need a little push, I'm a programmer myself but still not too familiarized with the Joomla API.

Thanks

Arunas
Click here to see the profile of this user The topic has been locked.

Re:profile does not exists if username has hyphen
Date: 2008/08/21 13:44 By: amazeika Status: CB Doc subscriber  
Karma: 0  
Fresh Joomlapolitan

Posts: 14
graphgraph
I did a little search in the CB code and found a problem with a regexp in the validate function in components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php.
I think there is something wrong with this regexp:

Code:

 if ($version == 1) {                     // "^[a-zA-Z](([\.\-a-zA-Z0-9@])?[a-zA-Z0-9]*)*$", "i");                     $regex="/^[\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-]*$/i";



It will only match if the username only has these characters or it’s an empty string because of the beginning and end of string delimiters (^ and $). Please correct me if I’m wrong, I’ve done regexps before but I’m not an expert in the matter and they tend to be tricky.

I’ve changed the regexp to something more straightforward as
Code:

 /[^\w+]/

. This way it only match when non-alphanumeric characters are present.

I suppose that the profile does not exist problem with Joomla SEF enabled was not taken into account since usernames are not supposed to have non-alphanumeric characters.

Please correct me if I'm wrong.

Arunas

Post edited by: amazeika, at: 2008/08/21 13:46

Post edited by: amazeika, at: 2008/08/21 13:47

Post edited by: amazeika, at: 2008/08/21 13:49

Post edited by: amazeika, at: 2008/08/21 13:54
Click here to see the profile of this user The topic has been locked.

Re:profile does not exists if username has hyphen
Date: 2008/08/21 15:01 By: nant Status: Admin  
Karma: 462  
Admin

Posts: 5980
graph
thanks for pointing this out and trying to debug

I will try and replicate and work with Beat for solution.
Nick A.
CB Core Team Member
Support CB Development and Get Detailed Documentation
Developer of Nant's Gallery plugin
CB Gallery Extensions Listing, Rate CB Gallery on Extensions Site
Developer of CB AutoWelcome Plugin
CB AutoWelcome Extensions Listing,Rate CB AutoWelcome on Extensions Site
People ignoring your call for help? Read this!
FAQ you
Joomlapolis Extensions Directory (new)- check it out!
Click here to see the profile of this user The topic has been locked.

Re:profile does not exists if username has hyphen
Date: 2008/08/21 16:38 By: amazeika Status: CB Doc subscriber  
Karma: 0  
Fresh Joomlapolitan

Posts: 14
graphgraph
np, I'm glad to help
Click here to see the profile of this user The topic has been locked.

Re:profile does not exists if username has hyphen
Date: 2008/08/25 23:25 By: nant Status: Admin  
Karma: 462  
Admin

Posts: 5980
graph
Ok - I can confirm that there is a problem with:

J 1.5.6
SEF enabled

Links like:

http://www.domain.com/cb-profile/userprofile/nant-test

render

a

This profile does not exist or is no longer available

page.

I guess this should be moved to known issues.
Nick A.
CB Core Team Member
Support CB Development and Get Detailed Documentation
Developer of Nant's Gallery plugin
CB Gallery Extensions Listing, Rate CB Gallery on Extensions Site
Developer of CB AutoWelcome Plugin
CB AutoWelcome Extensions Listing,Rate CB AutoWelcome on Extensions Site
People ignoring your call for help? Read this!
FAQ you
Joomlapolis Extensions Directory (new)- check it out!
Click here to see the profile of this user The topic has been locked.

<< Start < Prev 1 2 Next > End >>

Documentation

Documentation Subscription Service
(updated for CB 1.2 RC2)

What?

Why?

Where?

Just click here for answers!

Click here for a yearly subscription: subscribe now

Download Latest Release

The latest stable Community Builder Release is version 1.1 for Joomla 1.0 and Mambo.
You need to be a registered member of Joomlapolis to download.

The latest release candidate of Community Builder is version 1.2 RC3, native for Joomla 1.0, 1.5 and Mambo.
It is available as "thank you" to all CB documentation subscribers at this time.

CB Login