Admin page disables module

I created a simple module to extend oxlang and encountered some strange cookie behaviour. The module works fine until I ‘load’ the admin page via the same browser. As soon as the admin page is loaded (just loaded, not logged into), any future activity in the shop is executed using oxlang again, instead of my module.

This has something to do with cookies that the admin page is generating because if I clear cookies from my browser, my module work fine again up until I load the admin page.

Anybody out there encounter this before or have any tips before I try to debug?

My module is very simple as given below:

class cnx_lang extends cnx_lang_parent
{
    public function formatCurrency( $dValue, $oActCur = null )
    {
        if ( !$oActCur ) {
            $oActCur = $this->getConfig()->getActShopCurrencyObject();
        }
        return $oActCur->sign . number_format( (double)$dValue, $oActCur->decimal, $oActCur->dec, $oActCur->thousand );
    }	
}

Which Oxid Version… there is one (4.4.2?) who make problems with overloading language class.
http://www.oxid-esales.com/forum/showthread.php?t=6604#post39644

I’m on CE 4.4.3. Maybe the bug still exists in this version? If I understand the German thread correctly, I should try to append the following code to the end of config.inc.php and that’s it? No other changes? Not sure if this is relevant to my problem but it’s worth a try.


include getShopBasePath (). 'core/oxconfk.php' ;
$this -> _loadVarsFromDb ( $this -> getShopId (), array( 'aModules' ) );

Yes, at the end of config.inc.php. This makes, that the module definition will be loaded before any other.

Yes, thank you, that appears to fix the issue. Shouldn’t this be reported as a bug? Or has that already happened?

For me it works without this code in 4.4.5.

…but with this code you can overload several other classes which are normally not possible to overload.
…but this is not a solution for the EE-Version. I started a discussion in the mailing list - problems to ident the actual shop, if the shop is defined in a cookie.