<![CDATA[ Published article keeps disappearing from front-end - My Forums]]> https://forums.modx.com/thread/?thread=104985 <![CDATA[Published article keeps disappearing from front-end]]> https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end?page=2#dis-post-564496 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]]>
msjetboy Mar 19, 2019, 09:03 PM https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end?page=2#dis-post-564496
<![CDATA[Re: Published article keeps disappearing from front-end]]> https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end?page=2#dis-post-564606
Just an FYI.. I used the code to set the startid and it appeared to work but yesterday morning the article disappeared again so I commented out the code as you suggested as an alternative. As of right now the article is still published.

I'll monitor for a few days and if it appears stable I'll close this out as solved.

thank you again.

Michael]]>
msjetboy Mar 26, 2019, 01:31 PM https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end?page=2#dis-post-564606
<![CDATA[Re: Published article keeps disappearing from front-end]]> https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end#dis-post-564553 msjetboy Mar 22, 2019, 05:35 PM https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end#dis-post-564553 <![CDATA[Re: Published article keeps disappearing from front-end]]> https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end#dis-post-564552 ]]> BobRay Mar 22, 2019, 05:32 PM https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end#dis-post-564552 <![CDATA[Re: Published article keeps disappearing from front-end]]> https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end#dis-post-564550
I'll give those options a try! I truly appreciate the help.

Michael]]>
msjetboy Mar 22, 2019, 05:31 PM https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end#dis-post-564550
<![CDATA[Re: Published article keeps disappearing from front-end]]> https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end#dis-post-564548
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.

]]>
BobRay Mar 22, 2019, 05:07 PM https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end#dis-post-564548
<![CDATA[Re: Published article keeps disappearing from front-end]]> https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end#dis-post-564534 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]]>
msjetboy Mar 21, 2019, 02:22 PM https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end#dis-post-564534
<![CDATA[Re: Published article keeps disappearing from front-end]]> https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end#dis-post-564519
What version of PHP is the site running on?]]>
andytough Mar 20, 2019, 09:04 PM https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end#dis-post-564519
<![CDATA[Re: Published article keeps disappearing from front-end]]> https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end#dis-post-564507 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]]>
msjetboy Mar 20, 2019, 03:08 PM https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end#dis-post-564507
<![CDATA[Re: Published article keeps disappearing from front-end]]> https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end#dis-post-564506
Is the vanishing article the latest article? Or have others been written more recently that are not having this problem?]]>
andytough Mar 20, 2019, 02:54 PM https://forums.modx.com/thread/104985/published-article-keeps-disappearing-from-front-end#dis-post-564506