Skip to content
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

Search indexer stops working after changing module settings #59

Closed
valadas opened this issue Sep 4, 2020 · 0 comments · Fixed by #60
Closed

Search indexer stops working after changing module settings #59

valadas opened this issue Sep 4, 2020 · 0 comments · Fixed by #60
Labels
Milestone

Comments

@valadas
Copy link
Member

valadas commented Sep 4, 2020

Describe the bug

The module uses SearchModuleBase for indexing the announcements, after changing any module setting, the indexer stops working in certain timezone configurations. Dnn is not known for using best practices on timezones and in some places it uses utc, some other places the web server timezone, and some other places the sql server timezone. This is very inconsistent.

Best practices is for the DataStore to always use UTC when saving information and for the code to handle timezones as appropriate. The Announcements module just uses the server timezone for all dates and times, this is wrong as the server might not even be in the site timezone, etc.

Software Versions

  • DNN: any
  • Module: 07.02.03 and all previous.

To Reproduce

Steps to reproduce the behavior:

  1. Have a server that is in any negative timezone (in my case GMT-5)
  2. Clear Dnn Search and run the indexer scheduled task.
  3. Go to the module settings and enable RSS Feed. (changing a module setting updates the Module LastContentModifiedOnDate value for the module) which is wrong, we did not change any content by changing settings.
  4. Add a new announcement
  5. Run the indexer scheduled task again
  6. View the RSS feed

Wrong behaviour

The newly added announcement does not show and you can reindex all you want, it will never get indexed because changing the setting told the Dnn indexer that this point in time was the last content change, adding an annoucement does not change that and Dnn skips indexing the module until a new settings change is done, but then the schduler last indexed date is farther in the future than the last updated date of the actual announcement and well it is skipped forever.

Expected behaviour

There are a couple of things.

  1. The annoucement dates and times should not change if the webserver location or the sql server location changes, for this we need to save the data as UTC and in code convert them back to the site preferred timezone, that will handle server moves scenarios.
  2. We should not call SynchronizeModule when saving settings, this method was meant for content changes, not for settings changes. Also, I believe this was there in a time where changing settings would not clear cache. Dnn now handles that, so we can simply stop calling that method.

Error log

Note: Debug DLL's
This issue was not throwing any errors.

Additional context

I am submitting a PR for this shortly and due to the nature of the changes, I will publish a pre-release for testing.

I am specially interested in people testing this new release (7.2.4) on upgrades and localized installation usages. If you can test that new release and find issues with it, please comment...

@valadas valadas added the bug label Sep 4, 2020
@valadas valadas added this to the 7.2.4 milestone Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant