Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Adding new config parameters to an existing module. Bug in 2.1.1.0?
GazNewt
#1 Posted : Friday, July 09, 2010 6:20:36 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 2/2/2010(UTC)
Posts: 122
Location: England
This is doing my head in what am I doing wrong or is a bug in 2.1.1.0?

I want to add a new config parameter to a module so that when I add the module as a component on a page I can pass in some extra config. Done this lots of time. I add the new parameter it to the module.config and the option appears in the module parameter list in the Kooboo admin pages. However it is not visible to my module through ModuleInfo.ModuleSettings.

To actually make it visible to my module code I have to remove the module component from the page/s where I am using it and add it back. I don't need to leave the Page admin dialog, just remove the module and add it back.

This is what makes me think it is a bug in the Kooboo as this workaround is obviously not workable on a large site. I also don't remember having this problem in earlier version when I've used module parameters quite a lot

If I'm doing something stupid I'd love to know! What do you think?
Thanks
jifeng
#2 Posted : Friday, July 09, 2010 6:54:21 PM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,394
Location: Xiamen China
I am not very sure whether this is a bug or not. We saved module configuration in two locations.

1. Module.config. this is where the original module setting parameters/values.
2. CMS database. When a module added to a page, we will save the actual selected value of module parameters with that page.

In the page admin panel, the values come from both locations. We combine and present them. In the Module DLL, the value must come from Database.

In your situation, supposed that the "module.config" has 2 parameters, now you add a third parameters. This parameter is at module.config but not presented in the Database unless you open the Page Module setting and Save it again.

This is the logic of now, and your description match this design.

I am not sure whether this should be considered as a bug or not. but we will keep this in mind in the next version.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
GazNewt
#3 Posted : Friday, July 09, 2010 7:36:18 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 2/2/2010(UTC)
Posts: 122
Location: England
Ah yes this makes perfect sense now. I saw the new parameter in the component parameter list but I didn't press Save because the default value is what I wanted. And because it appeared there in the list I assumed that it was saved already

My other modules have many parameters that I was constantly changing in testing so this issue never came up, or if it did come up then it probably mysteriously sorted itself out as I made other changes, inadvertently saving the new values in the process

It's not really a bug in my opinion but it would be useful if somehow you could indicate in the component screen the parameters that have not saved in the database (that have come over from module.config changes)

Thanks Jifeng, that's great
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.074 seconds.