PDA

View Full Version : MM5.5 bug in StoreKey handling


Kent Multer
05-16-08, 08:48 AM
I have a module that works fine in 5.0, but fails in 5.5. One problem I've identified comes from StoreKey_Generate. In the Module_Install_Store function, I initialize a key for the module, with this call::


<MvASSIGN NAME="l.ik" VALUE="{ [g.Module_Library_DB].StoreKey_Insert(l.module:code, 0) }">


After that, under 5.5, the first call to StoreKey_Generate will fail. Under 5.0, it's fine.

MivaMerchant Corp., please advise?

Thanks --

wcw
05-16-08, 02:31 PM
Are you getting an error Kent? How do you know when it fails? I'll test a module that does the above if I know what to look for.

wcw
05-16-08, 03:07 PM
I just uninstalled and reinstalled a module in a 5.5 mysql store. The storekey was created correctly. Your command appears to be incorrect. You set it to 0. This is what I used to insert a record in the storekeys for a key called SupportLog.

<MvDO FILE = "{g.Module_Library_DB}" name = "l.success" value = "{StoreKey_Insert('SupportLog',1)}">

The function in the DB lib subtracts 1 from the value you pass when it inserts the first time. So when the storekey_generate is run it will issue the maxvalue+1, ie your intended first number.

Rick Wilson
05-16-08, 06:17 PM
Kent,

Can you let me know if Bill's answer solved your problem?

Kent Multer
05-16-08, 06:25 PM
After further testing, it appears that this may actually be a bug in my work, that somehow escaped my notice until now. Sorry for the false alarm --