Comments (41)
@james7342
Tnx for testing., I think I see what I have to change more.
I will try to set up a better test cycle (similar to yours), so I can verify it myself before bothering others :-)
More tomorrow.
from dnn.events.
I am still on it, but due to work and some private matters, I could not allocate time to do the requires changes and testing.
It is on my list...
from dnn.events.
@EPTamminga so you're saying that while it didn't error before DNN 9.8.0, it didn't store a meaningful value, right? So, it was never storing the list of IDs that you wanted it to store.
You have two options to get the serialization manager to handle a custom type like ArrayList
. First, you can move it to a property which has the string value and parse it manually when you need it. This is the strategy used by the ModuleCategoryIDs
setting:
DNN.Events/Components/EventModuleSettings.cs
Lines 356 to 385 in 356397a
The second option it to specify a custom serializer in the ModuleSetting
attribute. The Serializer
property of the attribute can be set to the name of a type that implements ISettingsSerializer<ArrayList>
, and then that class will be called to translate to and from string
when interacting with the settings table.
from dnn.events.
@bdukes Tnx for the suggestions.
What is was trying to say that it did work before DNN980. I will implement the change like the CategoryID's.
from dnn.events.
@james7342 You are right. I did not restart the site while testing myself.
from dnn.events.
Ernst, I think you might have got it.
Starting Environment:
DNN 9.7.2
Events 7.0.6
Test Setup:
Events Module on Page
Create 2 Locations via Edit Locations (Test1, Test2)
Create 3 Test Events
2 with the locations assigned (Test1, Test2)
1 with no Location
Test Case 1:
Adjust Module Filter Location (Events/Edit Setting/Filter Events by Location)
Set Module Filter to Test1, Load Page, Only Test1 Events displayed
Set Module Filter to Test2, Load Page, Only Test2 Events displayed
Set Module Filter to All, Load Page All Events displayed
Everything works as expected
Test Case 2:
Upgrade to DNN 9.8.1
Verified page Load Failure
Run Delete SQL statement in Host/DNN SQL Console
Page still had error message
Restart Application - Host/Servers - Critical in order for the page to load properly
Page loads without error
Copy Test DLL files in to Root/Bin Folder (Events707TestDLL.zip)
Restart Application - Host/Servers - Critical in order for the page to load properly
Verify page still loads without error on new DLL's
Adjust Module Filter Location (Events/Edit Setting/Filter Events by Location)
Set Module Filter to Test1, Load Page, Only Test1 Events displayed
Set Module Filter to Test2, Load Page, Only Test2 Events displayed
Set Module Filter to All, Load Page All Events displayed
Everything Works as expected
Test Case 3:
Restart Application - Host/Servers - Just to perform additional reset
Verify page still loads without error
Adjust Module Filter Location (Events/Edit Setting/Filter Events by Location)
Set Module Filter to Test1, Load Page, Only Test1 Events displayed
Set Module Filter to Test2, Load Page, Only Test2 Events displayed
Set Module Filter to All, Load Page All Events displayed
Everything Works as expected
Test Case 4:
Restart Dev/Test PC Virtual Machine
Verify page still loads without error
Adjust Module Filter Location (Events/Edit Setting/Filter Events by Location)
Set Module Filter to Test1, Load Page, Only Test1 Events displayed
Set Module Filter to Test2, Load Page, Only Test2 Events displayed
Set Module Filter to All, Load Page All Events displayed
Everything Works as expected
from dnn.events.
I can confirm this.
After installing the debug assemblies I got the following in the inner stack trace:
at Components.EventModuleSettings.CreateEventModuleSettings(Int32 moduleId, String localResourceFile) in C:\DDrive\Develop\GitHub\DNN.Events\Components\EventModuleSettings.cs:line 247
at Components.EventModuleSettings.GetEventModuleSettings(Int32 moduleID, String localResourceFile) in C:\DDrive\Develop\GitHub\DNN.Events\Components\EventModuleSettings.cs:line 101
at Components.EventBase.get_Settings() in C:\DDrive\Develop\GitHub\DNN.Events\Components\EventBase.cs:line 1378
at Components.EventBase.GetThemeSettings() in C:\DDrive\Develop\GitHub\DNN.Events\Components\EventBase.cs:line 475
at Components.EventBase.SetTheme(Panel ctlPnlTheme) in C:\DDrive\Develop\GitHub\DNN.Events\Components\EventBase.cs:line 422
at DotNetNuke.Modules.Events.Events.Page_Load(Object sender, EventArgs e) in C:\DDrive\Develop\GitHub\DNN.Events\Events.ascx.cs:line 591
at System.Web.UI.Control.OnLoad(EventArgs e)
[....]
It looks like that loading the theme causes the issue.
I tried uninstalling the module, and after re-installing it it worked fine, but I had to go back to 9.7.2 not to lose the events.
from dnn.events.
Something strange with the modulesettings?
from dnn.events.
Nothing special, afair. Would a list of all ModuleSettings be helpful?
BTW: It happened on two different sites, both of them have an instance of the module (these are all sites that I have that use the module). There is no master calendar or anything. Both portals have only one language activated (de-AT),
I installed DNN 9.7.2 (blank site template) in a testing environment, activated de-AT and deactivated en-US. I installed the Core Resource Pack (de-AT), Events 07.00.06 and the de-AT resource pack. Then I placed an instance of the Event module on the start page. There were just a few settings to change to make it work (Email addresses, timezone - note: I did not change anything else!), then I added some events,
Then I upgraded to DNN 9.8.0 - and the error was there.
So it is easy to reproduce.
from dnn.events.
I didn't spend much time on it due to 9.8.0 being pretty new. When I tested I believe I got the same error. I restored the site back to 9.7.2 and really didn't do much troubleshooting.
from dnn.events.
Just tried to upgrade a site from DNN 9.6.1 to 9.8.0 - same problem. Here I have a "master" calendar that includes three sub calendars. The only one that works is the sub-calendar that does not have a single event (lazy editor :-))
from dnn.events.
Set up a DNN 9.7.2 website (blank template), just added the Events Module, I placed it on the start page, set the timezone and the email addresses and added an event. Upgraded to 9.8.0 -> Error. So this is no localization issue.
Did the same without adding an event, and without changing any setting (just went into settings, and clicked update). Then upgraded to DNN 9.8.0. No error, Could add an event as well.
from dnn.events.
The serialization in DNN980 has changed on several points from previous DNN versions causing a breaking error:
DotNetNuke.Entities.Modules.Settings.SerializationManager.DotNetNuke.Abstractions.ISerializationManager.DeserializeProperty[T](T myObject, PropertyInfo property, String propertyValue, String serializer)
at DotNetNuke.Entities.Modules.Settings.SettingsRepository1
I did not have time yet to see how this can be fixed.
from dnn.events.
I get the same error (Message:Could not cast System.Collections.ArrayList to property ModuleLocationIDs of type System.Collections.ArrayList
StackTrace:
at DotNetNuke.Entities.Modules.Settings.SerializationManager.DotNetNuke.Abstractions.ISerializationManager.DeserializeProperty[T](T myObject, PropertyInfo property, String propertyValue, String serializer) ... after upgrade to DNN 9.8.
from dnn.events.
@brewadmin Yes, I know, it is a result of the changed Settings routines in DNN980. I still have to see what has to be changed...
from dnn.events.
from dnn.events.
Has anyone discovered a fix for this? We had a ransomeware attack on our server and have been forced to upgrade to 9.8 and now the events module doesn't work. I've looked at the code, but I can't see the failure. Any thoughts on how to get this working?
from dnn.events.
I think the error is related to a change in DNN980 in serialization:
dnnsoftware/Dnn.Platform#4312
I did not find the time yet to dig deeper into the problem.
from dnn.events.
I was thinking it was more related to this change. dnnsoftware/Dnn.Platform#4087
But I could be wrong. I to tried looking at the code to see if I could figure it out. I don’t have a proper DNN development environment setup so was unable to follow the DNN source code. I was able to install the symbols and could see which lines of code being reported. That was about it though.
from dnn.events.
@james7342 I think you are right.
I will try to allocate some time tomorrow to have a serious look since the problem irritates me :-(
from dnn.events.
The error is coming from the ModuleLocationIDs
property in the settings, which is an ArrayList
, but is marked as a ModuleSetting
. Without a custom serializer specified, there's no way for this property to be serialized and deserialized correctly. I'm guessing that the error was silently ignored before the change in 9.8.0, but I don't see that it was doing anything useful with this field prior to 9.8.0. If you remove the ModuleSetting
attribute, does that resolve the issue?
DNN.Events/Components/EventModuleSettings.cs
Lines 414 to 428 in 356397a
from dnn.events.
That looks like it fixes it. I created a DNN 9.7.2 instance. Installed Events 7.0.6 and placed module on page. Changed some random settings and created a single test event. Upgraded to DNN 9.8.1 and verified the issue. Created a fork of the project and just commented out the line 414. Rebuilt the project and installed the module (Repair Installation). Loaded the page and the calendar loaded without error. Since I'm not an everyday developer and not sure what other possible issues might happen with this change I'll let someone smarter than me do the actual code change and commit. But playing with this in my little slice of the world appears to have resolved it. Looks like maybe this was just an errant line.
//[ModuleSetting]
public ArrayList ModuleLocationIDs
{
get
{
if (ReferenceEquals(_moduleLocationIDs, null))
{
var arLoc = new ArrayList();
arLoc.Add(ModuleLocationID);
_moduleLocationIDs = arLoc;
}
return _moduleLocationIDs;
}
set { _moduleLocationIDs = value; }
}
from dnn.events.
@bdukes Tnx for having a look. I need to see if the ModuleSettings is a result of VB,net->C# conversion some releases ago.
I know I had the idea to have a look 2 days ago, but time flies when you need to do "normal" work from home in Corona times...
from dnn.events.
I have looked into it somewhat further. The code is from serious time back.
The list of locations should be saved in the module settings since the module can limit the locations that are available for events in a particular module instance.
Commenting out the line [ModuleSettings] is not the solution (yes, it is the solution to circumvent the error, but does not enable saving the settings for location id's).
I have to look a bit further to make it without error.
Frustrating is that it did work correctly pre DNN980, the setting stored = a "System.Collections.Arraylist"
from dnn.events.
Thanks guys - good stuff here and that makes sense. I appreciate everyone jumping in to make this compatible with DNN 9.8!
from dnn.events.
I am having the same issue. I upgraded to DNN 9.8.1 and updated the Events module to 7.0.6 version. The module is loading with an error and the page is breaking.
Please can you advise how to fix this? I a using the installable PA version of the Events module.
from dnn.events.
@maduranga001 To fix this at the moment you have the following possibilities:
- Stay on DNN 9.7.2 until an upgrade of the Events module is available.
- Create a fork, fix the issue and start a pull request.
As we see in Brian's and Ernst Peter's post above, a solution should be near...
from dnn.events.
Thank you @malikt
Actually, now we have already upgraded to DNN 9.8.1 and we have to stay with it. So I have to wait for the new release.
@maduranga001 To fix this at the moment you have the following possibilities:
- Stay on DNN 9.7.2 until an upgrade of the Events module is available.
- Create a fork, fix the issue and start a pull request.
As we see in Brian's and Ernst Peter's post above, a solution should be near...
from dnn.events.
Testing and verification
I just installed a clean DNN981, installed a clean Events706 and did not find any error...
It works as expected, including a limitation for a category and/or a location in the module settings with no errors.
I installed the Events706 on a clean DNN972, created events, no problem.
Created an addition module instance in a separate page and used a limitation in category and location.
In DNN972, no problem. I upgraded to DNN981. The events module that did not have a limitation on location and category had no problem, the instance that had the limitation, did have the error.
Hotfixing the problem
By deleting (by SQL) the modulesettings table that limits the category and/or location, I can make the module work again. The only negative effect is that you have to reapply the limits on categories and/or locations in the module settings, because those limitations are removed by the SQL statement.
Hotfix
The SQL statement (to be used from the SQL console in the Host) is:
DELETE FROM {databaseOwner}[{objectQualifier}ModuleSettings]
WHERE ModuleID IN
(
SELECT DISTINCT MS.ModuleID
FROM {databaseOwner}[{objectQualifier}ModuleSettings] AS MS
INNER JOIN {databaseOwner}[{objectQualifier}Modules] AS MO
ON MO.ModuleID = MS.[ModuleID]
INNER JOIN {databaseOwner}[{objectQualifier}ModuleDefinitions] AS MD
ON MD.ModuleDefID = MO.ModuleDefID
WHERE MD.DefinitionName = 'Events'
)
AND [ModuleSettings].SettingName LIKE 'Module%Ids';
Events707
In the Events707 update, I will implement this delete statement, so the upgrade will also remove the settings since I see no option to upgrade the settings.
Verification?
I would be more than happy if people here could verify the solution I listed here.
@MaiklT @maduranga001 @djamell @blair260 @james7342 @brewadmin Any of you willing to test it in your scenario?
New version in the works
In the meantime, I will change the locationId's settings as mentioned by @bdukes
from dnn.events.
@EPTamminga
Performed the below tests. The workaround is short lived. Once the application is restarted the error returns on page load.
Environment:
DNN 9.7.2
Events 7.0.6
Test Setup:
Events Module on Page
Create 2 Locations via Edit Locations (Test1, Test2)
Create 3 Test Events
2 with the locations assigned (Test1, Test2)
1 with No Location
Test Case 1:
Adjust Module Filter Location (Events/Edit Setting/Filter Events by Location)
Set Module Filter to Test1, Load Page, Only Test1 Events displayed
Set Module Filter to Test2, Load Page, Only Test2 Events displayed
Set Module Filter to All, Load Page All Events displayed
Everything works as expected
Test Case 2:
Upgrade to DNN 9.8.1
Verified page Load Failure
Ran Delete SQL statement in Host/DNN SQL Console
Page still had error message
Restart Application - Host/Servers - Critical in order for the page to load properly
Page Loads without Error
Adjust Module Filter Location (Events/Edit Setting/Filter Events by Location)
Set Module Filter to Test1, Load Page, Only Test1 Events displayed
Set Module Filter to Test2, Load Page, Only Test2 Events displayed
Set Module Filter to All, Load Page All Events displayed
Everything Works as expected
Test Case 3:
Restart Application - Host/Servers
Page Load Failure same error
Failure
Let me know of you want me to do any further testing. I run my test environment in VMware and create snapshots before I do anything. Easy restore back to starting point.
from dnn.events.
@james7342 In your test environment: update the bin with the following files, but DO clean the settings with the SQL first.
from dnn.events.
Thank you very much.
If I try the above solution for now, how do we use the next new version? Do you have the solution to replace before we install the newer version?
from dnn.events.
@maduranga001 First of all, do not use the above things in a production environment. They are just for testing purposes here.
I will create a new version (Events 7.0.7, that will handle all the update stuff, with one exception: if you have used the locations and/or category limitations in the module settings, you have to reapply them after installing the new version.
I will try to limit the update to the location settings, but I have to do some testing first..
from dnn.events.
Different error this time, but still a failure after restarting application.
Test Setup:
DNN981
Event706
Test Case 1:
Confirm page load failure
Run Delete SQL statement in Host/DNN SQL Console
Copy Test DLL files in to Root/Bin Folder (EVents707DLL.zip)
Restart Application - Host/Servers
Page Load without error
Adjust Module Filter Location (Events/Edit Setting/Filter Events by Location)
Set Module Filter to Test1, Load Page, Only Test1 Events displayed
Set Module Filter to Test2, Load Page, Only Test2 Events displayed
Set Module Filter to All, Load Page, All Events displayed
Everything works as expected
Test Case 2:
Restart Application - Host/Servers
Page Loads with error - Though different error message then prior and no Events shown.
Error: Events is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: Input string was not in a correct format. ---> System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at System.String.System.IConvertible.ToInt32(IFormatProvider provider) at Components.EventModuleSettings.get_ModuleLocationsSelected() in C:\DDrive\Develop\GitHub\DNN.Events\Components\EventModuleSettings.cs:line 454 at DotNetNuke.Modules.Events.SelectLocation.get_SelectedLocation() in C:\DDrive\Develop\GitHub\DNN.Events\SubControls\SelectLocation.ascx.cs:line 119 at DotNetNuke.Modules.Events.EventMonth.BindDataGrid() in C:\DDrive\Develop\GitHub\DNN.Events\EventMonth.ascx.cs:line 167 at DotNetNuke.Modules.Events.EventMonth.Page_Load(Object sender, EventArgs e) in C:\DDrive\Develop\GitHub\DNN.Events\EventMonth.ascx.cs:line 113 --- End of inner exception stack trace ---
from dnn.events.
@EPTamminga and @james7342 - has anyone had any luck with getting this to work? I tried with the build but keep getting the same, or something similar, error. What are you guys thinking? Thanks for all the help here! - Sam
from dnn.events.
@blair260- Nothing is fixed yet in code and the potential workaround doesn’t work long term. Ernst was going to do some more work on it, but I’m sure the day job might be getting in the way. Anyone running the module should hold off on upgrading to DNN 9.8.X at this point until it’s resolved.
from dnn.events.
I could finally allocate time to have a new round on the error.
Do not do the following things on a production site!
The instruction is for testing purposes only!
Instruction for validation
The instruction below can be executed on an upgraded site (DNN980 or DNN981) that has DNNEvents 7.0.6 installed and produces the error.
Run the following SQL statement in the Host/SQL option, to clear out the setting that causes the error (you will lose the location limitation setting in the module settings, but that has to go)
DELETE FROM {databaseOwner}[{objectQualifier}ModuleSettings]
WHERE ModuleID IN
(
SELECT DISTINCT MS.ModuleID
FROM {databaseOwner}[{objectQualifier}ModuleSettings] AS MS
INNER JOIN {databaseOwner}[{objectQualifier}Modules] AS MO
ON MO.ModuleID = MS.[ModuleID]
INNER JOIN {databaseOwner}[{objectQualifier}ModuleDefinitions] AS MD
ON MD.ModuleDefID = MO.ModuleDefID
WHERE MD.DefinitionName = 'Events'
)
AND [ModuleSettings].SettingName = 'ModuleLocationIds';
Unzip the files in the attached zip en copy (overwrite) them in the bin folder of the site.
Events707TestDLL.zip
Things should work now without error.
Please provide feedback
@MaiklT @maduranga001 @djamell @blair260 @james7342 @brewadmin Any of you available to do some testing?
If I get confirmation on success, I will create a new DNNEvents release
from dnn.events.
@james7342 Thank you for your feedback!
from dnn.events.
from dnn.events.
@brewadmin There is already an issue (#85) about this.
from dnn.events.
I have created an update (07.00.07) that should solve the problem.
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.
I will combine this with the removal of the Telerik controls that are used for these sestings (multi select combobox).
from dnn.events.
Related Issues (20)
- Casting Error HOT 1
- Telerik Removal HOT 2
- Module settings not saving HOT 42
- Error on DNN 9.9 with Telerik Removed HOT 1
- Error when upgrading Events 07.00.06 -> 07.00.07 HOT 2
- Event reminder emails sent in error HOT 2
- Events Module not updating Series Elements HOT 2
- Excessive loading time of the Edit Event page when a Portal has a large amount of Users HOT 2
- DNN9.10.0: Cannot add event on portals other than portal 0 HOT 2
- Error after 9.10 Upgrade HOT 3
- Following DNN Platform Telerik Removal Instructions HOT 5
- Make it ready for VS2022
- Update for release 07.00.08 HOT 3
- How to update the owner dropdown? HOT 1
- Sub-Calendar not displaying events. HOT 4
- Edit Settings/ToolTip appears to not save. HOT 2
- Upgraded to DNN 9.10.06 event module not able to add/update event HOT 7
- Events module goes into error on Add Event
- When clicking Add event, module times out and aborts. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dnn.events.