upgrading from 5.4.1.1 to 5.4.2.1
Permalink
i have upgraded a site from 5.4.1.1 to 5.4.2.1 (i get the same results while upgrading to 5.4.2) and get the following message when accessing public profiles:
Call to a member function getAttributeKeyID() on a non-object in ... /concrete/models/attribute/types/select/controller.php on line 377.
i also get this error when trying to view the user list in the dashboard (/index.php/dashboard/users/search/). i am guessing that this might have to do with the fact i have user profiles enabled and have added custom attributes to the user profile, as this has not happened to upgrades (5.4.1.1 > 5.4.2.1) that do not utilize the user profile. the user profile custom attributes include the types of:
- text
- rich text
- address
- select (multiple options)
system info
mac osx 10.6 using macports to manage AMP environment:
- apache 2.2.19
- mysql 5.1.57
- php 5.3.8
any ideas? any help/assistance is greatly appreciated....
thanks!
Call to a member function getAttributeKeyID() on a non-object in ... /concrete/models/attribute/types/select/controller.php on line 377.
i also get this error when trying to view the user list in the dashboard (/index.php/dashboard/users/search/). i am guessing that this might have to do with the fact i have user profiles enabled and have added custom attributes to the user profile, as this has not happened to upgrades (5.4.1.1 > 5.4.2.1) that do not utilize the user profile. the user profile custom attributes include the types of:
- text
- rich text
- address
- select (multiple options)
system info
mac osx 10.6 using macports to manage AMP environment:
- apache 2.2.19
- mysql 5.1.57
- php 5.3.8
any ideas? any help/assistance is greatly appreciated....
thanks!
it also seems that:
does not return anything. if i print_r($ak), nothing prints out.
$ak = CollectionAttributeKey::getByHandle('county');
does not return anything. if i print_r($ak), nothing prints out.
phew... found the fix!! for some reason the code i posted previously worked with 5.4.1.1 but not with 5.4.2+ using the CollectionAttributeKey object. after some back tracing found out that the AttributeKey object was passing "collection" as the attribute key category handle. when in fact i needed it to pass "user" as the collection key category handle. i changed my call to CollectionAttributeKey to UserAttributeKey and all worked fine. the new code looks like this:
i hope this might help someone else out that runs into a similar problem.
$uaks = UserAttributeKey::getPublicProfileList(); $ak = UserAttributeKey::getByID(21); $satc = new SelectAttributeTypeController(AttributeType::getByHandle('select')); $satc->setAttributeKey($ak); $counties = $satc->getOptions();
i hope this might help someone else out that runs into a similar problem.
the first four lines execute fine, as i can leave them uncommented and not cause an error. however, the last line is what triggers the error:
when i comment that line out, all executes fine.
i hope this helps a bit to further explain the problem.