Codoforum related discussions
Sticky topics don't remain on top of the main page

Hello,

@admin Please note that Sticky Topics don't remain on top of the page, even if you have selected the sticky and show in front page and category page option.

Using CodoForum v4.9.4

5edb72ddf40c0

Hello, @admin Please note that **Sticky Topics** don't remain on top of the page, even if you have selected the **sticky and show in front page and category page** option. Using CodoForum v4.9.4 ![5edb72ddf40c0](serve/attachment&path=5edb72ddf40c0)
edited Jun 7 at 3:31 am

That's strange, this forum is running on v.4.9.4 and sticky topics seem to be working fine.
We will have a look at some scenarios and see whats wrong.

That's strange, this forum is running on v.4.9.4 and sticky topics seem to be working fine. We will have a look at some scenarios and see whats wrong.
Necessity is the mother of all inventions!

@admin

I have had the experience that if a topic was pinned on and a topic author is editing it again after it got pinned at a later point in time (update etc.), then it loses the "pinned status" after being saved.

Kind regards, Andy smile

@admin I have had the experience that if a topic was pinned on and a topic author is editing it again after it got pinned at a later point in time (update etc.), then it loses the "pinned status" after being saved. Kind regards, Andy :)

I think this is the issue, as I've edited the topics multiple times.
Also, after I closed the 2 new topics above the sticky one, it became first again.

I think this is the issue, as I've **edited** the topics multiple times. Also, after I closed the 2 new topics above the sticky one, it became first again.

Hi,

We were thinking of fixing this in v5.0 but since it's giving you issues, we will try to fix it today and give you a manual fix.

Hi, We were thinking of fixing this in v5.0 but since it's giving you issues, we will try to fix it today and give you a manual fix.
Necessity is the mother of all inventions!

Hi,

Please try this to fix your issue. Open sys/CODOF/Forum/Topic.php

Around line 185, replace

'ORDER BY Field(t.topic_status, ' . Forum::APPROVED_CLOSED . ', ' . Forum::STICKY_CLOSED . ', 
               ' . Forum::APPROVED . ' , ' . Forum::STICKY . ' ) DESC, t.last_post_time DESC ' .

with

'ORDER BY t.topic_status DESC, t.last_post_time DESC ' .
Hi, Please try this to fix your issue. Open sys/CODOF/Forum/Topic.php Around line 185, replace ``` 'ORDER BY Field(t.topic_status, ' . Forum::APPROVED_CLOSED . ', ' . Forum::STICKY_CLOSED . ', ' . Forum::APPROVED . ' , ' . Forum::STICKY . ' ) DESC, t.last_post_time DESC ' . ``` with ``` 'ORDER BY t.topic_status DESC, t.last_post_time DESC ' . ```
Necessity is the mother of all inventions!

It worked!

Thanks @admin you're a saint!

EDIT: Now it sets the Sticky topics first, but if you also have some Closed topics, it puts them after the sticky (like it's second in importance), without taking into consideration the post date.

So how it should be:

  1. Sticky first
  2. Other posts sorted by the posting date (doesn't matter if they are open or closed).
It worked! Thanks @admin you're a saint! **EDIT:** Now it sets the **Sticky** topics first, but if you also have some **Closed** topics, it puts them after the sticky (like it's second in importance), without taking into consideration the post date. So how it should be: 1. Sticky first 2. Other posts sorted by the posting date (doesn't matter if they are open or closed).
edited Jun 22 at 5:52 pm
96
7
3
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft