Skip to content

Conversation

@roland-ruedenauer
Copy link
Contributor

@roland-ruedenauer roland-ruedenauer commented Sep 30, 2025

Userprofile items: set properties ITEMTYPE and REV_NUMBER at creation.
Use existing itemtype constants in blog.py.

@roland-ruedenauer roland-ruedenauer marked this pull request as draft September 30, 2025 23:34
@roland-ruedenauer roland-ruedenauer force-pushed the itemtype-related-changes branch from bb4a716 to 5d23b03 Compare October 1, 2025 22:41
@roland-ruedenauer roland-ruedenauer marked this pull request as ready for review October 2, 2025 08:35
@UlrichB22
Copy link
Collaborator

Existing users still do not have ITEMTYPE and REV_NUMBER in there meta data. What is the background for this change?

@roland-ruedenauer
Copy link
Contributor Author

The motivation here is improving consistency in the foundations of the data model.

  • Why set ITEMTYPE for most of the entries but not Userprofile?
  • Searching for meta[REV_NUMBER] indicates pieces of existing code expect the property to exist

Especially the REV_NUMBER looks confusing to me. Sometimes it is missing for an item, while for newer revisions it might me present. Then it is unclear whether it is 0 based or not.

@UlrichB22
Copy link
Collaborator

Should we change the 'moin maint-validate-metadata' command to set ITEMTYPE and REV_NUMBER for existing wikis?

# Skipping checks for userprofiles, as revision numbers and parentids are not used here
if backend == app.cfg.backend_mapping[NAMESPACE_USERPROFILES]:
continue
# fix bad parentid references and repeated or missing revision numbers

@UlrichB22 UlrichB22 merged commit 3cde2e1 into moinwiki:master Oct 5, 2025
9 checks passed
@roland-ruedenauer roland-ruedenauer deleted the itemtype-related-changes branch October 5, 2025 18:08
@roland-ruedenauer
Copy link
Contributor Author

Should we change the 'moin maint-validate-metadata' command to set ITEMTYPE and REV_NUMBER for existing wikis?

In my opinion: yes, for sure

You may also check the content import functionality from old wiki instances does "the right thing" too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants