Skip to Content Skip to Menu

[SOLVED] CB New User Confirmation Error

  • sentix
  • sentix
  • OFFLINE
  • Posts: 106
  • Thanks: 7
  • Karma: 0
10 years 2 months ago #247860 by sentix
Replied by sentix on topic CB New User Confirmation Error
@krileon:
sorry, you may have misunderstood me. I'd like to know SINCE WHEN the bug is known. Got it introduced with version 1.9.1?

[cite]How long do we wait for CB2.0?
When it's done.[/cite]

That's not a nice answer. For months, I receive mails with the advertising of your "AHA WOW" engine and I have to pay maintenance fees. What do I get: only marketing mails. This is annoying.

In the meantime a really serious bug emerges that breaks a multilingual site! And you do nothing to help! Instead, users should wait "until its finished". Sorry, that is a very poor service and led me think about to make my first posting in the JED :-(

About migration:
I know that you are not responsible for J1.5 upgrades but my question is, if a simple database copy of the CB tables is sufficient if the users ID keep the same. That's it, nothing more.

Versions: CB 2.7.2, J 3.10.6

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8282
  • Karma: 1443
10 years 2 months ago - 10 years 2 months ago #247879 by krileon
Replied by krileon on topic CB New User Confirmation Error
Regarding your issue. The below quickfix should resolve it. Please perform the below changes and confirm if your issue persists.

IN: administrator/components/com_comprofiler/library/cb/cb.tables.php
ON: Line 1837
FROM:
Code:
$this->_cmsUser = $_CB_framework->_getCmsUserObject();
TO:
Code:
$this->_cmsUser = $_CB_framework->_getCmsUserObject( $this->id );

IN: administrator/components/com_comprofiler/plugin.foundation.php
ON: Lines 2960 - 2978
FROM:
Code:
function & _getCmsUserObject( $cmsUserId = null ) { if ( $this->_cmsUserNeedsDb ) { global $_CB_database; $obj = new $this->_cmsUserClassName( $_CB_database ); } else { $obj = new $this->_cmsUserClassName(); } if ( $cmsUserId !== null ) { if ( ! $obj->load( (int) $cmsUserId ) ) { $obj = null; } else { if ( checkJversion() == 2 ) { global $_CB_framework; $obj->gid = (int) $_CB_framework->acl->getBackwardsCompatibleGid( array_values( (array) JFactory::getAcl()->getGroupsByUser( $obj->id, false ) ) ); } } } return $obj; }
TO:
Code:
function & _getCmsUserObject( $cmsUserId = null ) { if ( $this->_cmsUserNeedsDb ) { global $_CB_database; $obj = new $this->_cmsUserClassName( $_CB_database ); } else { $obj = new $this->_cmsUserClassName(); } if ( $cmsUserId ) { if ( $obj->load( (int) $cmsUserId ) ) { if ( checkJversion() == 2 ) { global $_CB_framework; $obj->gid = (int) $_CB_framework->acl->getBackwardsCompatibleGid( array_values( (array) JFactory::getAcl()->getGroupsByUser( $obj->id, false ) ) ); } } else { throw new UnexpectedValueException( CBTxt::P( 'User id failed to load: [user_id]', array( '[user_id]' => (int) $cmsUserId ) ) ); } } return $obj; }

As J1.5 support is dropped in CB 2.0 I've adapted the fix so it should continue to work on 1.5, 2.5, and 3.0 as needed perfectly fine. Please note as I've no 1.5 install anymore at this point I did not test the above quickfix. Please let me know if you've any issues with the quickfix or if it doesn't solve your issue.

The first fix makes sure the CMS user object loads when mapping the CMS and CB users together. Currently without the fix it's always mapping to a new user, which is why your params get lost.

The second fix makes sure the API function only attempts to load a real user id. As null and 0 are not valid load values it'd error when really it should just give an empty object (e.g. registration this would be the case).

I know that you are not responsible for J1.5 upgrades but my question is, if a simple database copy of the CB tables is sufficient if the users ID keep the same. That's it, nothing more.

Migration is much more than that. The major issue is Usergroups and View Access Levels. They have different IDs in Joomla 2.5/3.0 compared to Joomla 1.5. For example Public is 0 in J1.5 while it is 1 in J2.5/J3.0. Migration extension can be used to migrate the entire core and at the least move extension tables over, but you'll need to manually go through CB and correct your View Access Levels and Usergroups. Many have had varied success using "SP Upgrade", but I've not personally used it. I recommend checking out some of the migration extensions on JED below.

extensions.joomla.org/extensions/migration-a-conversion/joomla-migration

The key thing to look for in the migration extensions is to ensure they maintain User ID as the two tables (_comprofiler and _users) link together by user id (as does many other extension tables).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 10 years 2 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • sentix
  • sentix
  • OFFLINE
  • Posts: 106
  • Thanks: 7
  • Karma: 0
10 years 2 months ago #247893 by sentix
Replied by sentix on topic CB New User Confirmation Error
@krileon:

Thanks, that is great support! The fix seems to work.

Versions: CB 2.7.2, J 3.10.6
The following user(s) said Thank You: krileon

Please Log in or Create an account to join the conversation.

  • beat
  • beat
  • ONLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
10 years 2 months ago #247921 by beat
Replied by beat on topic CB New User Confirmation Error
Great!

In complement of Kyle's answer, to answer your non-technical questions:

This bug was reported during the last CB 2.0 Beta 5 before the current RC testing and promptly fixed for (current) CB 2.0 RC. As far as Kyle and me are aware it was not reported nor being confirmed before then.

Regarding CB 2.0 *Stable* release, it is true that it will be released when it is ready (as there are well over a million sites using CB (according to Google), we better release stable when it's stable). I can only give you my current guess: RC got released 8 days ago. RC.2 (with all reported bugs fixed) should be released in the next days. Then we might have another very stable RC before the (completely) stable release. So it is a question of weeks only. From there on we should have new releases quite often (very backwards compatible as usual).

As for migration from Joomla 1.5 to Joomla 3.x (which is extremely highly recommended for security reasons (e.g. you need to apply unofficial Joomla 1.5.99 security patch immediately if not already done) should be made using CB 1.9.1. You can/should do that migration anytime soon (don't go through Joomla 2.5 as it is End Of Life end of this year). Then when CB 2.0 stable is released, it will be a simple upgrade from CB 1.9.1 on Joomla 3.3.3+.

Yes, please feel free to do a review on the JED when you have a minute. We love to read great reviews and it is helpful for others choosing their extensions too. :-)

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
The following user(s) said Thank You: krileon

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum