Omeka
Omeka copied to clipboard
Issue #926: Use record_url for path to public page on admin interface
For themes/modules that override default URLs, this ensures that the "View Public Page" link on the admin interface goes to the correct URL for an item on that particular site, rather than forcing /items/show/<id>
Have you checked this without having a plugin overriding the URL? I think the admin/public problem I mentioned in your initial issue would still happen here.
Have not tested it yet, but I will!
@zerocrates just tested finally, and on a default install this just links to items/show/item_id
, as it should.
And you're sure it's not linking to the admin items/show/<id>
page? I'm pretty sure that's what your change does.
Nope it was the regular /items/show
page. I mean, please do test it yourself too to verify, I'd be happy to work on the code further if need be.
I did test it. It makes the link go to the admin item show page.
Huh strange -- let me see if I can replicate that on my end
Apologies, I was checking the detail page, not the edit page; you're totally right. Do you have any suggestions about how to dynamically get the correct public item page URL here, in a way that would allow sites to use urls other than /items/show/record_url
.
I alluded to this problem in your original issue #926: links that go from one "side" to the other need special handling. For links created from strings, we have public_url
and admin_url
functions that force the URL to be created on the correct side.
I think the answer here involves creating new public_record_url
and admin_record_url
functions and using the public one here. If you look at public_url
and admin_url
you'll see that the process involved is pretty simple.
Got it, thanks! Will submit a revised PR next time I can squeeze in some time..