We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49646
    • 25 Posts
    Hi all,
    We have one article published in our Articles set up right now an dit seems to keep disappearing from teh front end. We find we have to go in and edit the article and click save then it returns.

    Any insight as to why this is happening?

    Thank you!

    Michael
      • 3749
      • 24,544 Posts
      What version of MODX are you running?

      Is your version of Articles up to date?
      [ed. note: BobRay last edited this post 5 years, 1 month ago.]
        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
        • 49646
        • 25 Posts
        Hi Bob,

        Sorry for lack of specs, I sent the message as I was running out of the office..

        MODX Revolution 2.6.5-pl
        Articles 1.7.11-pl
        getPage 1.2.4-pl
        quip 2.3.3-pl

        From previous post it seems get Page and Quip are needed. Extras seems to be current.
        Client has opted to hold off on the latest MODX update but if that is a factor then I can push back.

        Also running Version X

        VersionX 2.1.3-pl which seems to have an update available

        Michael
          • 38783
          • 571 Posts
          Are you using any caching services, like Cloudflare, or caching facilities on your server other than the built in MODX cache? If you are could any of these be mis-behaving and reverting back to previous versions of the site?

          Is the vanishing article the latest article? Or have others been written more recently that are not having this problem?
            If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

            email: [email protected] | website: https://andytough.com
            • 49646
            • 25 Posts
            Quote from: andytough at Mar 20, 2019, 02:54 PM
            Are you using any caching services, like Cloudflare, or caching facilities on your server other than the built in MODX cache? If you are could any of these be mis-behaving and reverting back to previous versions of the site?

            Is the vanishing article the latest article? Or have others been written more recently that are not having this problem?

            Hi Andy,

            No additional cache services and this article at the time is the only article.

            Michael
              • 38783
              • 571 Posts
              Is there anything in the MODX error logs?

              What version of PHP is the site running on?
                If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                email: [email protected] | website: https://andytough.com
                • 49646
                • 25 Posts
                Quote from: andytough at Mar 20, 2019, 09:04 PM
                Is there anything in the MODX error logs?

                What version of PHP is the site running on?


                Hi Andy

                PHP Version 7.1.8

                I see this in the error log but have to admit ignorance as to what it means:

                [2019-03-08 16:10:26] (WARN @ /opt/rh/httpd24/root/var/www/html/www.XXXXXXX.com/www/core/components/articles/model/articles/articlesrouter.class.php : 65) PHP notice: Undefined variable: startPageId

                Thanks!,

                Michael
                  • 3749
                  • 24,544 Posts
                  Here's the line that's causing the error:

                  if ($alias && $startPageId == $archiveId) {


                  It's throwing an error because, as far as I can tell, $startPageId is never set. This may or may not be the cause of your issue.

                  The first thing I'd try is putting this line just above the problem line in the core/components/articles/model/articles/articlesrouter.class.php file.

                  $startPageId = 12; // change 12 to the ID of your first article


                  If that doesn't work, you can eliminate the error by commenting out this section:

                  if ($alias && $startPageId == $archiveId) {
                      $startPageResId = $archiveId;
                      if (isset($archive[1])) $startPagePrefix = $archive[1];
                  }


                  Like this:

                  /* 
                  if ($alias && $startPageId == $archiveId) {
                      $startPageResId = $archiveId;
                      if (isset($archive[1])) $startPagePrefix = $archive[1];
                  }
                  */
                  


                  Since $startPageId is never set, it's unlikely to equal $archiveId, so the code it probably not executing anyway.

                    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
                    • 49646
                    • 25 Posts
                    Thank you Bob!

                    I'll give those options a try! I truly appreciate the help.

                    Michael
                      • 3749
                      • 24,544 Posts
                      Don't thank me until it works. wink
                        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