We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53162
    • 15 Posts
    Hi,

    I'm having an issue occasionally when I add a new news / blog post to a site in production (staging environment is fine) where the links to the page don't work, they just take you back to the home page instead. This is throughout the site - have the simple search plugin and when searching for text in that resource, it brings that resource back, but the link takes you to the home page. There's a news and blog hub page where that links to the home page too.

    You can actually get to the page by manually putting the URL into a browser or by doing ?id=[id], so not sure what the issue is, especially with it working on staging. I'd assume it's a server thing, but unsure what it could be.

    I'm not sure whether this is an issue with the collections plugin or something totally different.

    Version wise - I'm using MODx Revolution version 2.5.4 - I have upgraded to 2.5.5 on testing, but is needed to be tested a bit before pushing to staging and live.
    Using collections version 3.6.0 and simple search version 1.9.2

    When it happened before, it somehow fixed itself, no idea how though as I hadn't made any changes. We tried deleting the resource last time and re-adding it, but it gave the same issue and still didn't work.

    Tried clearing the cache too and that didn't make a difference and the URL doesn't look to have any special characters, just numbers, dashes and standard a-z characters (all lower case).

    Hope someone can help with this strange issue!

    Thanks in advance,
    Bryan

    This question has been answered by blunder. See the first response.

    • discuss.answer
      • 53162
      • 15 Posts
      Seems to have fixed itself again.

      Our client doesn't want an accessible backend in production (they think it will help security for some reason), there are plans to add one at some point, but not been booked in yet.

      Because of this, I have to clear the cache in the server manually. Not sure why, but it seemed like this hadn't worked as i'd copied the database over and that had worked fine.

      Not sure if this was just an issue of the cache not being cleared properly, though I ran the same command the last time that i'd ran before (sudo rm -rf * in the core/cache folder)
        • 3749
        • 24,544 Posts
        Is the base href tag in the head section of your templates uncached (with the exclamation point)? That could help.

        <base href="[[!++site_url]]" />
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 53162
          • 15 Posts
          Yes it is, thanks for the suggestion though!