[Joomla 1.5RC3-FIX] Profile update cb.core foreach

11 years 3 months ago #79916 by CyberCobre
file didn't attach. Reposted. Mod, please delete this post

Post edited by: CyberCobre, at: 2008/11/18 00:19
11 years 3 months ago #79918 by CyberCobre
To fix this, simply FTP into your account, download (forced ascii) the cb.core.php file found in:

../components/com_comprofiler/plugin/user/plug_cbcore

Find lines 235 and 236 which will look like this:

$userParams = array();
$userParams = $this->_getUserParams($ui, $user);

Change them to this (in other words, swap them around):

$userParams = $this->_getUserParams($ui, $user);
$userParams = array();

Reload the cb.core.php file (forced ascii, overwrite)

Problem solved.

A zip file of the fixed cb.core.php file is attached.




Attachment cb-e13bd50628871d3cf476322ca5ce5619.zip not found

Attachments:
11 years 2 months ago #80388 by chechovacan
sdwyer wrote:

I would also recommend changing line 238 of cb.core.php from:
[code:1]if ( ( count( $userParams ) > 0 ) && in_array( $_CB_framework->getCfg( "frontend_userparams" ), array( '1', null) ) ) {[/code:1]
to:
[code:1]if ($userParams !== false && ( count( $userParams ) > 0 ) && in_array( $_CB_framework->getCfg( "frontend_userparams" ), array( '1', null) ) ) {[/code:1]
since it is possible that JParameter::getParams could return false, and count(false) returns 1 for some reason.


:woohoo: This just work fine!... thanks a lot!...
11 years 2 months ago #80455 by judlee
squallata wrote:

in comprofiler.html.php
change this
[code:1]
//--><!]]></script>
<form action="<?php echo sefRelToAbs("index.php?option=$option".getCBprofileItemid(true)); ?>" method="post" id="adminForm" name="adminForm" onsubmit="return submitbutton(this)">
<!-- TAB -->
[/code:1]
white this
[code:1]
//--><!]]></script>
<form action="<?php echo "index.php?option=$option".getCBprofileItemid(); ?>" method="post" id="adminForm" name="adminForm" onsubmit="return submitbutton(this)">
<!-- TAB -->
[/code:1]
and i can update my profile now :D


This worked perfectly. Thanks so much for posting the fix. :cheer:
11 years 2 months ago #81242 by motnaf
thnx man , you are genius!!!!!
11 years 2 months ago #81880 by iPoul
For some reason, the only thing all these fixes do, is remove the error, im still not able to actual update the profile (front-end) as a regular user, it just tries to fetch some article which doesnt exist, tho it equal the user id i try to update.

Joomla 1.5.7 - CB 1.1
Moderators: beatnantkrileon
Time to create page: 0.476 seconds

Facebook Twitter LinkedIn