Articles missing?

check this often to be informed about any security problem that was reported.
User avatar
Oliver Georgi
Site Admin
Posts: 9387
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau
Contact:

Articles missing?

Postby Oliver Georgi » Sat 1. Jan 2011, 12:56

If you have an older install or an install of phpwcms which has a long history your article can end with 01/01/2011.

[UPDATE 3]
For those of you having no FTP access it might help to create a new CP HTML in the backend containing the following in the [PHP] inline tag. Run the article once in frontend. It should return a bool(true). The article in which the new CP HTML is created must have a valid end date. Check that first, otherwise the [PHP] is not processed!!!

Code: Select all

[PHP]
$r = @mysql_query("UPDATE ".DB_PREPEND."phpwcms_article SET article_tstamp=article_tstamp, article_end='2030-12-31 23:59:59' WHERE article_end='2010-12-31 23:59:59' AND article_deleted=0", $GLOBALS['db']);
var_dump($r);
[/PHP]

If everything is fine then, you can delete the CP HTML again or just disable it.


[UPDATE 2]
I have released a patch file which can be downloaded on GitHub. This fix will update the fixed article end date (2010-12-31 23:59:59 problem) by adding additional 20 years. It works with every install of phpwcms. Download the fix, unzip it and put it in the web install root directory of your phpwcms installation (in the same level as login.php, index.php and phpwcms.php). Upload the script by ftp then point your browser to http://%yourphpwcms.com%/phpwcmsfixarticledate.php.

[UPDATE 1]
To solve that behavior (sorry for that) you have to update article end dates. I have prepared a short screencast how you can do this using phpMyAdmin or equivalent tool. http://flic.kr/p/96Hv8s

Check this upgrade script which corrects article end date:
https://github.com/slackero/phpwcms/blo ... ledate.php
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn

User avatar
Oliver Georgi
Site Admin
Posts: 9387
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau
Contact:

Re: You miss your articles

Postby Oliver Georgi » Sat 1. Jan 2011, 17:38

You can also change the article end date using phpMyAdmin or other DB tool:

Code: Select all

UPDATE phpwcms_article SET article_end='2030-12-31 23:59:59' WHERE article_end='2010-12-31 23:59:59' AND article_deleted=0

Set DB prefix if you use one for the concerned install: %your-db-prefix%_phpwcms_article.

Watch the screencast
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn

sciint
Posts: 1
Joined: Thu 6. Jan 2011, 11:05

Re: You miss your articles

Postby sciint » Thu 6. Jan 2011, 11:10

Hi, I would like some help on how to fix the problem with the fixed article end date. I have read all the information you have put up, and watched the screencast but I am none the wiser. Please could you give me further information as I do not want to have to go through every article individually.Thank you.

frenzal
Posts: 17
Joined: Fri 17. Mar 2006, 17:17
Location: Belgium
Contact:

Re: You miss your articles

Postby frenzal » Tue 11. Jan 2011, 15:59

Hadn't touched phpwcms for ages and then suddenly none of the content was displaying on an old site. Glad it was an easy fix but still

User avatar
Oliver Georgi
Site Admin
Posts: 9387
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau
Contact:

Re: You miss your articles

Postby Oliver Georgi » Tue 11. Jan 2011, 16:09

frenzal wrote:Glad it was an easy fix but still

What do you mean?
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn

frenzal
Posts: 17
Joined: Fri 17. Mar 2006, 17:17
Location: Belgium
Contact:

Re: You miss your articles

Postby frenzal » Tue 11. Jan 2011, 16:35

That all I had to do was an update query, I was worried at first something more serious had gone wrong.


Return to “phpwcms !!!Security Alert!!!”

Who is online

Users browsing this forum: No registered users and 1 guest