ProfessionalWiki / PersistentPageIdentifiers

MediaWiki extension that adds persistent identifiers to wiki pages
https://professional.wiki/en/extension/persistent-page-identifiers
GNU General Public License v2.0
1 stars 0 forks source link

Save persistent page identifier #17

Closed malberts closed 1 week ago

malberts commented 1 week ago

For:

Screencast_20241112_171338.webm

malberts commented 1 week ago

@JeroenDeDauw I marked as draft for illustration, but I think we will need to drop the page_props approach.

I did not initially pay attention to this specific note on https://www.mediawiki.org/wiki/Manual:Page_props_table

Note that reparsing a page causes all of its properties to be purged from this table and replaced with the new ones, so this table is not suitable for storing data that can't be regenerated during a reparse.

I ran into that issue when editing a page dropped the ID. So basically it has to resave the ID on every edit. I managed to get the current ID to resave it. But something like ?action=purge also clears the page properties. I am not sure what else might trigger a reparse. So unless we try to hunt down and work around such issues, it seems like this is fundamentally the wrong approach since our ID is something that should not be regenerated (even if that means resaving the old value).

JeroenDeDauw commented 1 week ago

Agree, we can't use page_props

I also think it best to specifically only generate IDs on page creation. This behavior is easier to understand.