DNN.Events icon indicating copy to clipboard operation
DNN.Events copied to clipboard

Module settings not saving

Open brownjerod opened this issue 4 years ago • 42 comments

We have had this issue on a few sites that we are using the module, but haven't seen any others mention it

Steps to reproduce the behavior:

  1. Go to Event Module Settings
  2. On 2 different sites, we have under the General Tab, "Filter Events by Category", I would select one of the categories, click save, and none of the changes take affect. Have experienced the same issue under the Display tab, "Events List Settings", "Select Events by Number" changed from 2 to 5 for example, and click save, and no changes take affect.

brownjerod avatar Feb 12 '21 14:02 brownjerod

Take a look at closed issue #229. The last note by Ernst indicates he had some suspicion to I believe what you're experiencing might be an issue this.

" I have to some additional research, because I have the idea that the default filtering on categories and/or locations in the module settings are not saved on restarts. If you do not use this setting (most users do not use this particular filtering), you do not have to worry."

james7342 avatar Feb 18 '21 18:02 james7342

@EPTamminga I think your suspicions were correct.

james7342 avatar Feb 20 '21 17:02 james7342

I know, I also know why, but I have not solved it yet. I have to define a new method to save the list of id's in settings.

EPTamminga avatar Feb 21 '21 15:02 EPTamminga

does anyone know if there is a way to bypass the settings and make a change in the database for now that would allow for the filter by categories? We have this live on a client site, and long story short was forced to update to 9.8 which we never do for this reason and we are in a jam to find a temp fix if it is possible.

brownjerod avatar Feb 23 '21 23:02 brownjerod

Does anyone know if there is a way to bypass the settings and make a change in the database for now that would allow for the filter by categories? We have this live on a client site, and long story short was forced to update to 9.8 which we never do for this reason and we are in a jam to find a temp fix if it is possible.

brownjerod avatar Feb 23 '21 23:02 brownjerod

I don't think so. Looking at the DB and the value stored it looks like it's just storying a string value of "System.Collections.ArrayList". My thought is it should be a value or array of selected values. Maybe Ernst has some ideas.

james7342 avatar Feb 24 '21 01:02 james7342

AFAIK, There is no hotfix. The problem was introduced (I think) when the settings routines in the core were modified in 980.

EPTamminga avatar Feb 24 '21 12:02 EPTamminga

I use the "Filter Events by Category" setting on several government websites so this is important to me also before I upgrade.

djamell avatar Feb 28 '21 17:02 djamell

I wanted to check back in and see if anyone had made any headway on this? We have some sites actively using this with original functionality they cannot use and I am having to look at alternatives which I really do not want to move to if I can avoid it.

brownjerod avatar Mar 25 '21 15:03 brownjerod

@brownjerod I am working on a solution. Should be ready for test in a week or so

EPTamminga avatar Mar 25 '21 16:03 EPTamminga

@djamell @brownjerod @james7342 @techbubble

I think I have created a fix for the setting Category/Location filters not being saved. If you are able to test it before I create a new release, I would be more than happy.

The test can be done by replacing the Events DLL in the bin\ folder with the ones in the attached zip. An instruction .txt file is also in the .zip file. DNN_Events_07.00.08_TEST_DLL.s_UNZIPME.zip

As always, testing should be done in a test environment and not in production.

EPTamminga avatar Mar 29 '21 12:03 EPTamminga

Yes, I will try this. It might take a day or so to get back to you.

Thanks @EPTamminga !

djamell avatar Mar 29 '21 12:03 djamell

@EPTamminga, I tested this build on my test site and it appears to work as expected. I did a few application restarts and also confirmed via DB that comma separated values where written versus the prior "System.Collections.ArrayList". My testing though only validated categories as I don't have any locations defined. If the same code logic is applied there I think that locations would also test with success.

james7342 avatar Mar 30 '21 17:03 james7342

I'm just finishing up testing and while the settings do save correctly for categories and location, I ran into another problem.

If I filter by categories when I click to add a new event I get the following error:

ModuleId:539 ModuleDefId:131 FriendlyName: ModuleControlSource:DesktopModules/Events/EditEvents.ascx AbsoluteURL:/Default.aspx DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke ExceptionGUID:47be05d0-a969-4e51-b309-fa002df67acc AssemblyVersion:9.9.0 PortalId:0 UserId:2 TabId:122 RawUrl:/Departments/Circuit-Clerk/Commissioners-Sales/ctl/Edit/mid/539 Referrer:http://dev.jamelldigital.com/Departments/Circuit-Clerk/Commissioners-Sales UserAgent:Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0 ExceptionHash:YeV9/mMOikPVtz/IlQ76PtgSZoQ= Message:Specified cast is not valid. StackTrace: InnerMessage:Specified cast is not valid. InnerStackTrace: at DotNetNuke.Modules.Events.EditEvents.LoadCategory(Int32 category) in C:\DDrive\Develop\GitHub\DNN.Events\EditEvents.ascx.cs:line 1193 at DotNetNuke.Modules.Events.EditEvents.LoadEvent() in C:\DDrive\Develop\GitHub\DNN.Events\EditEvents.ascx.cs:line 983 at DotNetNuke.Modules.Events.EditEvents.Page_Load(Object sender, EventArgs e) in C:\DDrive\Develop\GitHub\DNN.Events\EditEvents.ascx.cs:line 226

Source: FileName: FileLineNumber:0 FileColumnNumber:0 Method: Server Name: XXXXXXX

djamell avatar Mar 30 '21 17:03 djamell

Follow up to my previous:

I had "Enable Category Select" set to "Do Not Display".

If I set "Enable Category Select" to either of the other two options I do not get the error and the Edit Details functions appear to work.

djamell avatar Mar 30 '21 17:03 djamell

@djamell, good info. I was trying to duplicate the issue and was unable to. With this additional info I can duplicate it also now.

ModuleId:453 ModuleDefId:122 FriendlyName: ModuleControlSource:DesktopModules/Events/EditEvents.ascx AbsoluteURL:/Default.aspx DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke ExceptionGUID:37fbe015-8d2c-4ea1-8e59-439956670b51 AssemblyVersion:9.9.0 PortalId:0 UserId:1 TabId:88 RawUrl:/Calendar/Chapter-Events/ctl/Edit/mid/453?popUp=true Referrer:https://www.xxxxxxx.com/Calendar/Chapter-Events UserAgent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15 ExceptionHash:YeV9/mMOikPVtz/IlQ76PtgSZoQ= Message:Specified cast is not valid. StackTrace: InnerMessage:Specified cast is not valid. InnerStackTrace: at DotNetNuke.Modules.Events.EditEvents.LoadCategory(Int32 category) in C:\DDrive\Develop\GitHub\DNN.Events\EditEvents.ascx.cs:line 1193 at DotNetNuke.Modules.Events.EditEvents.LoadEvent() in C:\DDrive\Develop\GitHub\DNN.Events\EditEvents.ascx.cs:line 983 at DotNetNuke.Modules.Events.EditEvents.Page_Load(Object sender, EventArgs e) in C:\DDrive\Develop\GitHub\DNN.Events\EditEvents.ascx.cs:line 226 Source: FileName: FileLineNumber:0 FileColumnNumber:0 Method: Server Name: generic262

james7342 avatar Mar 30 '21 18:03 james7342

@james7342 @djamell Tnx for the test, scenario and debug info. It will fixing easier. More later!

EPTamminga avatar Mar 30 '21 18:03 EPTamminga

I am working on it, I thought I solved it, but a related problem now appears on another point.

EPTamminga avatar Apr 04 '21 17:04 EPTamminga

Please let me know if I can do any testing. And thanks for the update

djamell avatar Apr 04 '21 17:04 djamell

@djamell @brownjerod @james7342 @techbubble

New test round, new fixes.

A new problem arose when I started to edit an event that was originally created with a category that was no longer allowed in the settings of the module. In short: be sure the set the right category and location limitations in the module settings before you start entering new events.

If you are able to test it before I create a new release, I would be more than happy.

The test can be done by replacing the Events DLL in the bin\ folder with the ones in the attached zip. An instruction .txt file is also in the .zip file. DNN_Events_07.00.08_B_TEST_DLL.s_UNZIPME.zip

As always, testing should be done in a test environment and not in production.

EPTamminga avatar Apr 05 '21 14:04 EPTamminga

With the latest DLLs, Restrict Categories now allows me to add an event but it does not display on the Calendar.

If I uncheck Restrict Categories the event displays.

djamell avatar Apr 05 '21 15:04 djamell

@djamell If, after editing, you page back/forward a month, the event does display or not?

EPTamminga avatar Apr 08 '21 07:04 EPTamminga

Yes!

Also, I discovered by accident that if you set "Filter Events by Category" to "All" and check Restrict Categories the module throws an error when either adding or editing. Even though those settings should not work in that combination I wouldn't think you would want it to error.

djamell avatar Apr 08 '21 11:04 djamell

@djamell Tnx. Most errors are a result of a casting/type difference between VB.net and C# and are a result of the migration of the source from VB.net to C# some versions ago. It will be solved in the end. Tnx for testing.

EPTamminga avatar Apr 08 '21 11:04 EPTamminga

Using Events Release 7.0.7 with DNN 9.6.2. I cannot find where either Locations or Categories are saved on the database. Thus, if you attempt to restrict events to a specific category or location, you cannot add a new event. The entry of both category and location on the Module Settings table is just Array List, with no values for the array list.

HZass avatar Apr 20 '21 18:04 HZass

@HZass This is an error in DNN7.x. I solved in V7.0.8, but there are some small issues left.

EPTamminga avatar Apr 20 '21 19:04 EPTamminga

Any update on when this issue will be incorporated into a release? Is there a release date?

HZass avatar May 11 '21 14:05 HZass

@HZass No release date set (free time is sparse).

I have to fix at least 1 issue (refresh calendar after adding a new event). That might take 5 minutes, or multiple hours or more.

EPTamminga avatar May 11 '21 17:05 EPTamminga

Is there any update for this issue? I support a website in which the module is displaying events from the wrong category due to this issue.

travisdiehlgdc avatar Jun 25 '21 15:06 travisdiehlgdc

I too am interested in the fully fixed version.

djamell avatar Jun 25 '21 15:06 djamell