UserAttributeType address causes Zend_Cache problem (can not redeclare)

Permalink
Hi,

I'm using the 5.6.1Beta.

I've created some user attributes (type:address). Now I need to get the address attribute (handle: company_address). I've done it before, but now I'm running into problems:

$userInfo = UserInfo::getByID(2);
// Get the company_name user attribute. No problem.
$cn = $userInfo->getAttribute('company_name'); 
// Try to get the company_address attribute (type:address). Whoops!
// Cannot redeclare Zend_Cache....
$ca = $userInfo->getAttribute('company_address');


I've included the complete Zend framework in /libraries/3rdparty/Zend and all is working fine.

Because 5.6.1B has some cache changes, is this the issue?

This is the call stack:

( ! ) Fatal error: Cannot redeclare class Zend_Cache in D:\wamp2.2\www\concrete5BETA\libraries\3rdparty\Zend\Cache.php on line 29
Call Stack
# Time Memory Function Location
1 1.0300 364584 {main}( ) ..\index.php:0
2 1.0309 436528 require( 'D:\wamp2.2\www\concrete5BETA\concrete\dispatcher.php' ) ..\index.php:2
3 3.2486 13140832 Concrete5_Library_View->render( ) ..\dispatcher.php:253
4 3.2738 14064336 include( 'D:\wamp2.2\www\concrete5BETA\packages\theme_2012\themes\2012\default.php' ) ..\view.php:922
5 11.5010 30022496 Concrete5_Model_UserInfo->getAttribute( ) ..\default.php:114
6 11.5111 30363408 Concrete5_Model_AttributeValue->getValue( ) ..\userinfo.php:360
7 11.5111 30363408 Concrete5_Controller_AttributeType_Address->getValue( ) ..\value.php:94
8 11.5112 30363408 Concrete5_Model_AddressAttributeTypeValue::getByID( ) ..\address.php:117
9 11.5118 30364528 Concrete5_Model_AddressAttributeTypeValue->__construct( ) ..\address.php:302
10 11.5118 30364584 Concrete5_Library_Loader->helper( ) ..\address.php:310
11 11.5128 30374416 ListsCountriesHelper->__construct( ) ..\loader.php:306
12 11.5130 30375328 Zend_Locale::getTranslationList( ) ..\countries.php:26
13 11.5150 30405040 Zend_Locale_Data::getList( ) ..\Locale.php:594
14 11.5158 30465232 require_once( 'D:\wamp2.2\www\concrete5BETA\libraries\3rdparty\Zend\Cache.php' ) ..\Data.php:309

SnefIT
 
SnefIT replied on at Permalink Reply
SnefIT
Well,

I think it's because of the ListCountriesHelper.

This one doesn't extend the core one, but is a standalone.

When I override the helper

<?php
defined('C5_EXECUTE') or die("Access Denied.");
class SiteListsCountriesHelper extends Concrete5_Helper_Lists_Countries {
}


it seems to work just fine. (well.... the full country isn't used in the useraddressattribute).
andrew replied on at Permalink Reply
andrew
This should be fixed in 5.6.1
SnefIT replied on at Permalink Reply
SnefIT
Hi Andrew,

I just downloaded the 4th beta.

Maybe this can help a bit. I have more situations where I get the message that Zend_Cache cannot be redeclared.
But whenever I use the same code in a job, it just gets executed without any error!?

Can I do something manually to eliminate this untill 5.6.1?