Can't view or edit single profile

18 years 1 month ago #9694 by jhayann1
Can't view or edit single profile was created by jhayann1
I can't view or edit my own profile; it says "This profile does not exist or is no longer available". But then, you can view members in the members list I made. The moment you click on them, however, you get the error mentioned.

I couldn't create a menu item/link to Community Builder either. I'm using the latest stable version of simpleboard, although I also have mamboboard and MyPMs2 installed. If I can't get CB to work, I'll just end up uninstalling it.

Help!

P.S. > - I'm a newb with Community Builder and Mambo so be gentle! (I'm migrating from php-nuke)

P.P.S. > Is anynoe else getting an error when accessing the Downloads section of this site?
Fatal error: Cannot instantiate non-existent class: dmconfig in /home/joomlapo/public_html/administrator/components/com_docman/classes/DOCMAN_config.class.php on line 88

Please Log in to join the conversation.

17 years 10 months ago #15335 by jhayann1
Replied by jhayann1 on topic Re:Can't view or edit single profile
FIX FOR THE VIEW PROFILE PROBLEM!!!

If you get the following error when viewing a profile:
"This profile does not exist or is no longer available",
then try the fix below. It's worked for me!

You'll need to make changes to the comprofiler.php file, found under components > com_comprofiler.

The changes are done on lines 352 thru 371. Replace all instances of:

[code:1]$_REQUEST[/code:1]

and change it to:

[code:1]$_GET[/code:1]


Or if this is easier for you, highlight/select lines 352 (look for "function setUserDBrequest") thru line 371 of your comprofiler.php file, then paste the following in its place:

[code:1]
function setUserDBrequest( $uid ) {
global $database;

if (!isset($_GET)) {
if (!$uid) {
return false;
}
$database->setQuery( "SELECT * FROM #__comprofiler c, #__users u WHERE c.id=u.id AND c.id=".$uid);
} else {
$userReq = urldecode(cbGetUnEscaped($_GET));
$len = strlen($userReq);
if (($len > 2) && (substr($userReq, 0, 1) == "'"«») && (substr($userReq, $len-1, 1) == "'"«»)) {
$userReq = substr($userReq, 1, $len-2);
$database->setQuery( "SELECT * FROM #__comprofiler c, #__users u WHERE c.id=u.id AND u.username='".cbGetEscaped(utf8ToISO($userReq))."'"«»);
} else {
$database->setQuery( "SELECT * FROM #__comprofiler c, #__users u WHERE c.id=u.id AND c.id=".cbGetEscaped($_GET));
}
}
return true;
}
[/code:1]


Good luck, and I hope it works for you! Oh, and BTW, I don't know what the security risks are if you do make the above changes so keep that in mind!!

:woohoo: :silly: :P :woohoo: :laugh:

Please Log in to join the conversation.

17 years 10 months ago #15358 by beat
Replied by beat on topic Re:Can't view or edit single profile
I saw your bug report but couldn't imagine what went wrong...

But thanks for your report, troubleshooting and fix proposal. :) really cool B)

I would guess firsthand that you have a combination of two special settings which made your situation truly unique:

1) you have a different non-default priority order of the GET, POST, COOKIES vars in REQUEST.

2) you have a cookie named "user" for that site...

Your fix is very ok security-wise, but you should probably check your php.ini file for that variables_order directive...

ch2.php.net/manual/en/ini.core.php

because many other places in Joomla, CB and other components suppose that cookies don't come before gets...So I would not classify this as a CB bug.

Thanks and Best Regards,

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

17 years 10 months ago #15443 by jhayann1
Replied by jhayann1 on topic Re:Can't view or edit single profile - FIXED
Yes, I believe the cookie (default) is user, and as for the priority of GET, POST, REQUEST, I couldn't tell you how or where that could be. I use Mambo 4.5.4 and my site's hosted thru godaddy.com. They're kinda hush-hush about accessing anything on the server that isn't in the public_html folder.

I'm glad that the fix isn't a security issue; I was worried that by doing it, I was opening a door elsewhere somehow. I did check php.ini and everything looks good, so thanks!

jhayann1
simply-irresistible.org

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.206 seconds

Facebook Twitter LinkedIn