-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgraded Site to DNN 9.2.2 and Forum to 5.1.0 - Forum does not display properly #25
Comments
Thank you very much. Copied in the dll and the pdb. I'm (kind of) pleased to report that I get the same exception as I saw in the debugger. BTW I think it looks different to Issue #19. Issue #19 reports an exception in Posts.RenderPostAuthor. That's not my experience, though it's possible both have the same underlying root cause. Here are the log records (same one five times over) 2020-02-25 11:07:20,817 [ACER-03][Thread:37][ERROR] DotNetNuke.Services.Exceptions.Exceptions - System.NullReferenceException: Object reference not set to an instance of an object. |
I'm still thinking that your modules are somehow mixed up. Are you able to compare what is the module id on the page (you can see that on the source) vs. in the database where posts are stored? |
Just in case, see what happens with this: |
Thank you again. I'm not entirely sure what I should look for in the tables. Here goes... View Source on the page got me to module 558. I looked in the modules table, 558 is a Forum, on Tab 149 (agrees with the URL in the browser), has the correct owning portal (id 4). I looked in the posts table for the latest post. The module breaks trying to display the author of the latest post so this seems useful. Latest post is #3517, it's a reply to #3515. Both of them have ThreadId 3515. I looked in the Threads table for threadid 3515. It is in Forum 8 I looked in the Forums table for ForumId 8. It is in Group 4 I looked in the Groups table for GroupId 4. It has ModuleId 558 (same as in the View Source) and PortalId 4 (the portal that owns this Forum. Am I looking for the right data here? |
Log records using the Archive.zip (Forums.Library.dll/pdb) from two posts up. AFAICS no change. 2020-02-25 12:17:32,196 [ACER-03][Thread:7][ERROR] DotNetNuke.Services.Exceptions.Exceptions - System.NullReferenceException: Object reference not set to an instance of an object. |
Did you check the database how that looks on moduleid's? |
I'm going to sound stupid here. I don't know what to look for. I think I have traced all the way from the post up to the module table (See three comments higher up for the full trail). The post links to moduleId 558 which is the same moduleid as I found in the view source. The other obvious place I can think of is TabModules. The Tabmodule table has a row Tabmoduleid 269. It links back to both TabId 149 and ModuleId 558. What other moduleId's should I look for? |
Are you able to search forum posts? Does that return anything? |
Search hits a similar exception... 2020-02-25 15:50:49,611 [ACER-03][Thread:66][FATAL] DotNetNuke.Framework.PageBase - An error has occurred while loading page. |
What are your cache settings for this site and for the forum module? |
see with this as well and also observe what is written into dnn log in debug mode at the time you try to access forum: Archive.zip |
Site Cache settings (I'm pretty sure these are the defaults): Module Cache settings (again I think the default) Copied over your files from the next higher comment. Set logging to DEBUG. 2020-02-25 19:38:42,215 [ACER-03][Thread:9][ERROR] DotNetNuke.Services.Exceptions.Exceptions - System.Exception: ModuleID: -1 |
Was there any DEBUG entries from forum before the exception? |
Also, check what is Cache Duration for Forum and Page |
At the page it has Output Cache provider = None I think there are no DEBUG entries from the Forum. I repeated calling up the page and there are some lines that I think relate to DNN working up to triggering the Forum module. I don't think there is anything from the Forum before the exception. 2020-02-25 20:08:59,156 [ACER-03][Thread:14][DEBUG] DNN.Trace - Container.ProcessModule Start (TabId:149,ModuleID: 57): Module FriendlyName: 'Forum') |
Switch Forum module to File caching with 0 as a time, recycle app and retry. Not really 100% sure if this none caching disables caching fully or not, but 0 as a time will do the trick. |
Forum module is already at File Caching, duration zero. It's the page level that has Caching = None. |
Set same for page as well |
I think it made no difference at all. Set page to FileBasedCaching and time to 0. 2020-02-25 21:05:52,278 [ACER-03][Thread:19][DEBUG] DNN.Trace - Container.ProcessModule Start (TabId:149,ModuleID: 57): Module FriendlyName: 'Forum') |
This is very strange, something is now wrong in your config and/or data. |
Hi Ilpo, Thank you so much for your help here. Would it be easier if I made a backup of the site files and the database available? They are about 800MB zipped, 17GB unzipped. Log output - 2020-02-26 10:18:19,576 [ACER-03][Thread:9][ERROR] DotNetNuke.Services.Exceptions.Exceptions - System.Exception: ModuleID: -1 |
Check debug entries just before this exception, there should be some more now to figure out why ModuleID is -1 |
Sorry nothing. That exception is the first line in the log file that contains the text "Forum". Before that are [DEBUG] messages about DNN building the Tab, and [WARN] messages about localization. The localization messages look like they come from the persona bar. I just rechecked the bin folder to makes sure I have the file you uploaded. DotNetNuke.Modules.Forum.dll has a created time 26/02/2020 08:36 - presumably when you built it displayed in UK timezone. The date modified is 10:16 - presumably when I copied it into my bin folder. |
Then it means that Forum does not get initialized correctly. Something is now wrong in your setup, I would try to reinstall forum to see if that fixes anything and if not, then better to check the DNN environment as well that upgrade went through. So just install it again in repair mode. |
When everything is ok you should see these two lines with the dll from today: |
Reinstalled in repair mode. EDIT - and dropped your latest two files into the bin folder. The problem is still there. Full disclosure those lines were in the older log file. I had not realized that they turned up before the debug iterate controls messages. New log messages. (I can confirm that TabId 149 and Module Id 558 are the values I expect.) 2020-02-26 13:27:31,608 [ACER-03][Thread:17][DEBUG] DNN.Trace - Container.ProcessModule Start (TabId:149,ModuleID: 57): Module FriendlyName: 'Forum') |
Totally lost with this one, seems that ModuleID is indeed being set correctly, but it is lost somewhere... There must be now some leftovers from that upgrade that just doesn't work correctly. |
Thank you very much for all your efforts. It is my staging site, so I can repeatedly recover and try stuff out on it. It starts at DNN 7.4.1 so forum 5.1 refuses to install. I'm OK with trying some incremental upgrades. What's the latest forum version that's DNN 7.4.1 compatible? Is there a recommended (or even just known good) approach to move from DNN 7.4.1 with Forum 4.5.3 - to DNN 9.somthing and Forum 5.1.0? |
Yes, DNN8 was set to required version if you look at the release notes. Then I believe you are safe to upgrade DNN9. |
What is your original forum version? |
It's Forum 4.5.3 that I am trying to upgrade from. This DNN install is quite old. Started in 2006-08-12 at DNN 4.3.2. I don't know if there is a record of the first forum version that was ever on there, but it will be of similar age. |
Try with this one first: https://github.com/DNNCommunity/DNN.Forum/releases/tag/05.00.03 |
Oh how embarrassing. I clearly cannot read the Extensions version page properly. It's Forum 5.0.5 I am trying to upgrade from. Apologies. Now that might be very interesting. I shall first try a repair install of 5.05. If that works then I shall move to 5.0.5.1 If that is broken then I shall look at the changes between them. |
Weird! Installed Forum 5.0.5. The install didn't actually ask me if I wanted to repair - that was a surprise. On testing, the forum layout is broken. This is odd because, allegedly it's the same version as is already installed. Doubly odd because if I attempt to install the previous release (Forum 5.0.4) the site says that I am already past that version and will not allow the install. Any ideas? |
What does broken mean? Do you have a custom skin? |
No - broken in the way I have seen when trying to upgrade all the way to the latest. In the latest (Forum 5.0.5) It is caused by the code hitting an exception and skipping past a couple of closing div tags. The broken appearance is the same, I am assuming the same cause. I have a custom site skin, but no custom skin for the forum. |
Try with some default dnn skin on forum page to see what happens with that |
Any ideas about this? On the site extension page the site claims to be running Forum V5.0.5. In the bin folder DotNetNuke.Modules.Forum.dll is 832KB and in it's properties has file and product version set at 4.5.3.19633. I un-zipped the install file for 05.00.05. The DotNetNuke.Modules.Forum.dll is 704KB and has file and product version set to 5.1.0.24601. So all I can say with certainty is they are not the same file. It looks to me like the site extension page is misleading about the installed version number. I think that means the database's opinion of the version number and the actual DLL in the bin folder are out of line. This is clearly a mess, and I have no idea how it got this way. Any suggestions for getting out of it? |
Hmm - that sounds like a mess... What is the date on original DotNetNuke.Modules.Forum.dll you are running? |
in explorer it shows 16 March 2014, 19:32:52 |
So it is pretty old, was looking at assembly versioning and cannot really see that version in the sources... |
Just in case, check your database and especially Contentitems. There should be on every row where TabID is your forum tab id ModuleID and it should be the one from your forum. |
Contentitems seems to be introduced in version 4.7 so it could very well be that your version is from before that. |
I went back to ground zero. Recovered the DNN 7.4.1/Forum 4.5.3 start point. At this point my DB has exactly one content item for this tab/module. It's Type 2 and seems to be for the entire forum. Upgraded the forum to 5.0.3 - all looked good Upgraded the forum to 5.0.4 - now the display is broken. Checked the DB. My database still has only one ContentItem that relates to this Tab. Should there be more? I set up a virgin site using DNN 9.5 and the latest Forum. That seems to have a ContentItem row for each forum thread. Those are of type 7 (I have no idea if the types are portable to different DNN installs.) Was one of the forum upgrades supposed to insert ContentItem rows for each thread in the forum? |
So this is then the actual issue. Lets see what happens with this one: It is for the latest forum version and once you have put this in place, reindex whole site and wait for it to finish and only then try accessing forum again. |
Can you just clarify what "reindex whole site" means? I don't know what action to translate that to. |
In DNN Site Settings→Search→Re-index Content/Re-index Host Content. Either one. |
Thanks. What did you expect to see? What I tried - Upgraded direct to DNN 9.1.1/Forum 5.1.0. Dropped in your DLL's, reindexed the site (thanks for the hint) The forum displayed better, but there were blanks after the text 'by ' (Ie it did not show who made the post. Same place it has been throwing exceptions all along.) Looking in the log I see the same ctor exceptions in Configuration.vb. If I guess the code now handles that exception and avoids missing out the closing div tags. If I click into a specific forum the display is still broken, looks like missing tags, but I ahve not detail checked the html. In the Database there is now one extra ContentItem. I thought I might see one per thread, but I don't have that. |
See if you have some entry like this in the log from forum:
If not, then indexing did not happen. While indexing it should now build the missing contentitems as well. |
@juvander. Ilpo, Thank you so much for your brilliant help and support. I think I have my answer. I did not have the log entries you mentioned. However I DID have Exceptions from the lucene indexer. They have been there for years, and I ignored them. Mainly because I don't use the built in DNN search on my site. I guessed the exceptions were because lucene was unable to write. I adjusted permissions on the site to allow lucene to write. Now I get lots of ContentItems, the Forum view is working as I expect, and I saw your log messages. I have a new problem with an exception when the forum attempts to send email, but I shall puzzle over that myself for a moment. Thank you again. |
Excellent |
My site was at DNN 7.4.1. I upgraded the site to DNN 9.2.2 and Forum to v5.1.0. After this the forum does not display properly.
I downloaded the Source, compiled, and ran under the debugger. Bless you for making that a very smooth and easy process. At line 947 in Groups.vb we have
If objForum.MostRecentPost.Author IsNot Nothing Then
Deep inside the Author property, at line 192 in Configuration.vb, we create a Configuration object. In my case the ModuleId passed to the constructor is -1. This causes the constructor to throw. Higher up, in Groups.vb, the exception is caught and causes the code to omit closing some div tags.
I tried hacking the Author property of PostInfo to convert the exception to a Nothing return.
That was enough to allow the Forums front page to display in a correct layout. The data was incomplete as it was missing the author information.
Clicking through to an individual forum though showed a corrupted display. I didn't investigate that in detail, but I think some similar problem has caused the code to emit incorrect html.
I am in well over my head here. It seems to me that the module id should not have been -1. I don't know if this is a problem in the forums tables of my database, or a problem in the code.
Any ideas on fixing this? The site is not private. I can make a backup of the site files and the database available.
The text was updated successfully, but these errors were encountered: