Group page has wrong "base URL" so relative links are broken

Look at https://www.zotero.org/groups/ac263. The Group Description contains links to tagged sections in the group, but these are invalid URLs. Because of how TinyMCE auto-shortens "internal" links, I can't find any way to fix these URLs.

In TinyMCE, these show up as "../ac263/items/tag/week01". That should work, however something (probably in JavaScript) is setting the base URL (maybe to "/groups" or just "/"), so when you click on those links it goes to "/ac263/items/tag/week01". The "/groups" is not in the URL, so it is invalid and doesn't work.

Ian
  • The group description is going to show up on various different pages, not all with the same base directory, so relative links are never going to work correctly for them. If you view the source on the linked page the quoted urls are in fact the href, and they go to the proper relative url, but when it is relative to a base groups page (as opposed to say a settings page where you're editing the description) that page does not exist.

    Is there some reason you don't want to use an absolute url?
  • I wasn't sufficiently clear -- I tried using absolute URLs, but TinyMCE auto-shortens them to relative URLs that don't work on the main group page. If you can get this to work, please let me know what you typed in to the "link" box in the TinyMCE editor. I've tried fully qualified URLs (http://...), absolute URLs without hostnames (/groups/ac263/items/tag/week01), and relative URLs (../groups/ac263/items/tag/week01), but in all cases after I save them TinyMCE changes the links to ../ac263/items/tag/week01 which does not resolve properly from the main groups page (/groups/ac263).

    Cheers,

    Ian
  • Ah, I see. I've changed that tinyMCE setting. It should generate absolute urls now.
Sign In or Register to comment.