On a local LAN this is not so bad as no one on the internet can see it
It would be on a local LAN if I did do two separate servers.
You’d be better of matching on page title assuming each resource is titled differently rather than id.
I don’t think I could safely assume unique titles. However, I believe that context+alias is unique when friendly URLS are used... so I suppose I could match on that.
But no - not having identical IDs would blow up any code that uses hard-coded IDs in links. If the page author puts a link to [[~17]] in their page, then resource #17 on the production box better be what they are expecting it to be...
OK, I’m probably already halfway up the wrong tree here, but how about this:
On acceptance server:
-hide the ’published’ checkbox
-onDocFormRender plugin: set ’published’ to 0 (always sets to unpublished when a doc is opened for editing)
-"Publish" button - duplicates ’save’ button, but sets ’published’ to 1 before saving. (And only appears after a document has been saved once???)
-onDocFormSave plugin:
- check value of ’published’
- check whether this resource has been saved before (can this be done?)
- if never saved before, then copy to production server (INSERT) w/ ’published’=0
- ...throw an error if the id’s don’t match
- if has been saved before, and published=1, copy to production (UPDATE)
It seems like with a setup like that (and assuming that you started with both ’acceptance’ and ’production’ resource ids in sync), you’d always have matching resource ids on both sides (and throw an error if some sort of weird race condition happens and you don’t).
I think this solution currently suffers from a complete lack of understanding of how & when plugins work. But... is there anything in there that someone with smarts could turn in to a viable solution?