Hi, thanks for your reply. I guess I'lll just change my module to try getShopConfVar with the "module:" prefix first and use it without the prefix as a fallback. I was thinking about branching depending on the shop's version number, but that's probably not reliable enough anyway.
I need to make sure that the module works correctly with the settings that are already stored in the database, so i can't switch to getConfigParam. ;-) Cheers, Robert -----Ursprüngliche Daten----- Datum: 15.01.2018 22:41:38 Von: K1 G. <[email protected]> An: Robert Rosendahl <[email protected]> Betreff: Re: getShopConfVar: "module:" prefix Vorgang: T-4TEG7W7ON0-56 > Hi robert, > > I think the module prefix in the oxconfig table is fine, also using it with > getShopConfVar does not sound new for me. But I remember I fixed a module > about a year ago by adding that prefix so I agree that it probably was added > some time ago. > > You should give the method getConfigParam a try, personally I think it's > easier to use. The only drawback is that you have to use a unique name for > you config parameter to avoid collisions with other modules. > > I can't tell you the version number when things changed, but maybe it helps > to know that the prefix is added when using the metadata and module settings > in the admin area and often modules that are trying to store config values by > their own running into situation described by you. > > best regards > > K1 > > Am 15.01.2018 12:53 schrieb "Robert Rosendahl" < [email protected] >: > > Hi, > > > > I just noticed that one of my modules doesn't return its oxconfig settings > > anymore. I fetch the settings via > > oxRegistry::getConfig()->getSh opConfVar('blGhApiAllowNonSsl' , null, > > 'ghoxid2greyhoundconnect'); > > > > The oxmodule column in the database, however, contains > > "module:ghoxid2greyhoundconnec t'". The "module:" prefix is probably added > > by the admin config page (extended from ghOxid2GreyhoundAdminConfig). If I > > fetch the setting with > > oxRegistry::getConfig()->getSh opConfVar('blGhApiAllowNonSsl' , null, > > 'module:ghoxid2greyhoundconnec t'); > > then I get the correct value. So it seems that I need to add the "module:" > > prefix in the getShopConfVar() call. > > > > Has this behaviour changed somehow - and if so, do you know since which > > version? > > > > I have several versions of OXID CE with which I test our modules, but I > > think I upgraded some of them from one minor version to the next. In my > > OXID CE 4.9, for example, I have settings with both > > 'ghoxid2greyhoundconnect' and 'module:ghoxid2greyhoundconnec t' in my > > oxconfig table. So these might have been duplicated when i upgraded the > > shop at some time and I probably didn't notice because the module just kept > > using the old settings (I haven't changed them in a while). :-D > > > > Now I've set up a fresh CE 4.10 and found that the module didn't get the > > oxconfig settings. > > > > I just need to know which versions of my module to fix. I've taken a look > > at the changelog in the OXID bugtracker, but couldn't find anything > > relating to getShopConfVar... > > > > Cheers, > > Robert
