1
DobePhat
News 1.53 archived/expired story problem?
  • 2007/5/5 22:59

  • DobePhat

  • Friend of XOOPS

  • Posts: 656

  • Since: 2003/4/15


HI, tried searching but couldnt find a related problem...

Subject:
News
1.53

View expired articles problem:

ever since our upgrade to this news version (which seems very promising),I have noticed a strange problem...
Didnt realize it until today and its got me perplexed and worried.

Our news articles are set to publish automatically and set to expire automatically..

Then they SHOULD be archived but still recognizeable by the story ID.

But as it turns out...the last 15 expired articles we have ....(as seen in admin and in searches)
when you click on them it says....
"Selected Story does not exist?"

What gives? never had this problem before and it appears that all our archived news since the upgrade is not viewable. Only being viewable during their lifespan.



Has anyone who uses this module checked their recent expired stories to see if they have this issue as well? You may not realize it as we didnt..(but it may be just us)

Any thoughts, suggestions, referalls or advice on this would be greatly appreciated!

Thank you!

2
skenow
Re: News 1.53 archived/expired story problem?
  • 2007/5/5 23:32

  • skenow

  • Home away from home

  • Posts: 993

  • Since: 2004/11/17


According to Herve at Instant-Zero, "WAD" (works as designed). The earlier behavior was tagged as a bug and was 'fixed' with 1.53

I, and others, have provided feedback on how we would like it to function. Please join and post your thoughts at the forum.

I discovered this change in functionality the same way you did - trying to access the archives and finding nothing. If you want to view the articles, you will need to go to the admin area of News and remove the expiration date. I'm not sure what date or length of time must go by before an article drops out of the main area and blocks and is only available in the archive.

My thoughts:
1. Published date works just fine
2. Expired date should work like it used to, move articles to the archive
3. Create another status to take an article offline, which removes it from public viewing, even in the archive
4. It would be nice to have the search function return active articles separate from the archive, or even require different access to view/search the archives, much like at newspaper web sites

I, too, like this module very much and some of the new features are very promising, especially the print links as footnotes and social bookmarking. I am holding off on any further upgrades until I weigh my options. The archive is a big thing.

3
DobePhat
Re: News 1.53 archived/expired story problem?
  • 2007/5/6 7:39

  • DobePhat

  • Friend of XOOPS

  • Posts: 656

  • Since: 2003/4/15


Thank you very much for this info.

Was beginning to worry it was something wrong with our install.

I will look for that thread there and offer some thoughts.


Quote:
2. Expired date should work like it used to, move articles to the archive


Agree 100%, makes perfect sense.



Suppose the short term fix for this is to reset some expiration dates to none..

4
DobePhat
Re: News 1.53 archived/expired story problem?
  • 2007/5/11 13:34

  • DobePhat

  • Friend of XOOPS

  • Posts: 656

  • Since: 2003/4/15


hmm, THis is a great module and I appreciate all the work gone into it.

BUT, is there anyway or method to have the archive function as before? In other words how can I roll back the archive behavior to the so called 'buggy' version without losing some of the current modules functionality .

The fix and the way it works just doesnt make sense to me from a users perspective and from a search engine perspective.

anyone have suggestions on this?

Thanks much in Advance

5
skenow
Re: News 1.53 archived/expired story problem?
  • 2007/5/11 14:48

  • skenow

  • Home away from home

  • Posts: 993

  • Since: 2004/11/17


I finally got motivated enough to look into this and think I have a fix for the 'fix'.

Edit news/class/class.newsstory.php, line 197:

$sql 'SELECT s.*, t.* FROM '.$db->prefix('stories').' s, ' .$db->prefix('topics').' t WHERE (s.topicid=t.topic_id) AND (s.published > ' $publish_start ' AND s.published <= ' $publish_end ') [color=ff0000]AND (expired = 0 OR expired > '.time().')[/color] ';


Remove AND (expired = 0 OR expired > '.time().') from the query string and save the file. Now try your archive!

6
DobePhat
Re: News 1.53 archived/expired story problem?
  • 2007/5/11 16:15

  • DobePhat

  • Friend of XOOPS

  • Posts: 656

  • Since: 2003/4/15


i Skenow, Thanks.
Does this work for you though, because it doesnt for us so far as I can tell.
also

Edit include/class.newsstory.php, line 197:

Mine is in

news/class/class.newsstory.php

is mine wrong or just a typo?


Thanks-still digging into it...seems like its the right track.

7
skenow
Re: News 1.53 archived/expired story problem?
  • 2007/5/11 16:29

  • skenow

  • Home away from home

  • Posts: 993

  • Since: 2004/11/17


My bad - I have corrected my earlier post. The proper path is news/class/class.newsstory.php

Here is what my final line looks like -

$sql 'SELECT s.*, t.* FROM '.$db->prefix('stories').' s, ' .$db->prefix('topics').' t WHERE (s.topicid=t.topic_id) AND (s.published > ' $publish_start ' AND s.published <= ' $publish_end ') ';


I had several expired articles (still do) that did not display in the archive until I made the change, now they do. I had to remember to log in, because the topic permissions still apply.

Further notes - while the above change does allow the expired articles to be listed in the archive, it does not allow me to view the articles that are expired. I will need to do more digging...

8
skenow
Re: News 1.53 archived/expired story problem?
  • 2007/5/11 16:53

  • skenow

  • Home away from home

  • Posts: 993

  • Since: 2004/11/17


To allow viewing of expired articles, edit article.php, starting at line 144 - I commented out the entire expired conditional

// Expired 
/* skenow removed to allow viewing of expired articles - this was added in this version
if ( $article->expired() != 0 && $article->expired() < time() ) {
    redirect_header(XOOPS_URL.'/modules/news/index.php', 2, _NW_NOSTORY);
    exit();
}*/


If you want expired articles included in the search results, you will need to edit include/search.inc.php at line 50 -

$sql "SELECT storyid, topicid, uid, title, created FROM ".$xoopsDB->prefix("stories")." WHERE (published>0 AND published<=".time().") [color=ff0000]AND (expired = 0 OR expired > ".time().')[/color] ';

9
DobePhat
Re: News 1.53 archived/expired story problem?
  • 2007/5/12 20:27

  • DobePhat

  • Friend of XOOPS

  • Posts: 656

  • Since: 2003/4/15


thank you very much for digging into this and sharing what you found!

Appears to work!

10
DobePhat
Re: News 1.53 archived/expired story problem?
  • 2007/10/8 15:08

  • DobePhat

  • Friend of XOOPS

  • Posts: 656

  • Since: 2003/4/15


Frusterated, today Realized that our archived articles, stories that are expired, are not searchable in the site search AND therefore also not viewable by search engines.



tried above no luck..

The stories at least are viewable if you happen to find them. Dont like this behaviour in the news module, is this still the norm on new versions of this module?

Anyone else find a work around for this?

Thanks so much..

Login

Who's Online

158 user(s) are online (109 user(s) are browsing Support Forums)


Members: 0


Guests: 158


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits