We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19328
    • 433 Posts
    I can't get my head around this little Articles problem.

    I'm using Archivist for Articles (to be able to test better I didn't go for the built in [[+archives]] placeholder but just use Archivist + getArchives snippets for now). Everything works, but my archive links look like this, this is on an Articles container with title 'test':

    http://www.site.nl/discussions/test2013/02

    There is no slash after the word 'test'. Surprisingly this does work though! But it doesn't look nice. So I figured: the articles container (with title 'test') just needs a trailing slash. Problem is: how do I add one? And why doesn't it have one anyway?

    In my System settings > Friendly URLS the 'container suffix' is set to '/'. I'm using friendly urls and friendly alias paths. I noticed there are other container pages on this website that also don't have a trailing slash, but also some that do have it.

    I first tried to change the alias from 'test' to 'test/'. This did not work. Then I went into the database and manually changed the uri field to 'discussions/test/'. Also checked the uri_override field. This was set to 1. I saved the record, cleared the cache and reloaded the page. Now the archive links do have the slash. But when I re-save the Articles container, the slash (and everything else that I put in the database uri field) disappears again. Instead, the uri field is set to the site URL+alias. This happens with url_override set to 1 (and also when it's set to 0).

    Is this the expected behaviour when saving an Articles container, am I missing something here?

    MODX Revo 2.2.8
    Articles 1.6.3
    Archivist 1.2.4
      • 19328
      • 433 Posts
      I think I fixed my own problem.
      It was something stupid... In the system settings for friendly_alias_trim_chars setting I had a bunch of characters, including a slash. That's why the slash got deleted from the alias laugh
        • 19328
        • 433 Posts
        Just a warning for anyone trying the same as I did above or following my suggestions: don't do it. Do not add a slash to the alias of your Articles container... If you do this, the URL's of the articles will have an extra slash and it won't work anymore.

        I had this problem in the first place because I was trying to use the same articles container resource as an archive and as the 'normal' blog landing page. Now I decided to have a separate archive resource. I can add the slash to the alias of this resource and the archive works like it should, like: site.com/archive/2013/10. And I won't have problems with article URLs having an extra slash.