TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,230
  • Total Topics: 21,353
  • Online today: 446
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 113
  • Total: 113

Bug - new articles always showing in front page?

Started by fallen, May 06, 2013, 05:19:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fallen

SMF version: 2.0.4
TP version: TP 1.0

When I create a new article, the "show on front page" option is automatically on.
So I deactivate it, and then I publish my article.
Then it takes me back to the article editing page, and the "show on front page" option is actually on! In fact, the article appears on the front page, even if I deactivated it before!
Then if I deactivate that option again, it works, the article doesn't show on the front page anymore and if I save the article, when it redirects me to the editing page, I can see it off.
What's wrong?


EDIT:
I finally managed to solve this bug by myself.
I will share my home-made solution, I'm sure the developers will find a more professional way to do it:
1) Open /themes/*yourtheme*/TPortalAdmin.template.php
2) find
<input name="tp_article_approved" type="radio" value="1" ', $mg['approved']=='1' ? 'checked' : '' ,'>  '.$txt['tp-yes'].'
3) replace with
<input name="tp_article_approved" type="radio" value="1" ', $mg['approved']=='1' ? 'checked' : '' ,'>  '.$txt['tp-yes'].'';
$solvebug=$_GET['sa'];
if($solvebug=="addarticle_html"||$solvebug=="addarticle_bbc"||$solvebug=="addarticle_php")
echo '<input name="tp_article_frontpage" type="hidden" value="0">';
echo '


That's it.

IchBin

Hi fallen, thanks for the report. I'll have to look into the code more closely to see what's going on. Thanks for posting your work-around!

IchBin

This actually needs to be changed to allow the option to be selected I think. This would allow someone to enable/disable whether the article displays on the frontpage and whether it's sticky or locked for editing. Current the option only works after you've created the article because no article ID has been set for it to update until the article is created. I'll put this in the tracker for a bug fix.

This website is proudly hosted on Crocweb Cloud Website Hosting.