Manage button randomly disappears?

Started by Zozma at Mar 23, 2021 at 9:39 pm
238 Views
3 Posts


Zozma

Trash Mammal

Patron

36Years Young
38 Posts

Hello, I come bearing another bug. I don't know if this one is related to the one described with joint posting? I don't have joint posting on/enabled, but maybe it's still tied to that issue. Anyway, so random posts of mine have become unable to be edited and I cannot figure out why. It does it on both my admin account and on character accounts.

 

 


user posted image



Arceus

codemancer

Admin

31Years Young
130 Posts

They don't think that I listen, oh but I know who they are.


Sorry for the delay!

So the manage button shows on a variety of conditions. It must not be edit locked by someone and that someone not be you; you must own the post and be logged in; if joint posting is on you must be logged in; the board must not be read only; or you need to be a power user.

Now the thing with joint posting is that it relies on the edit locking system. This prevents players from editing the same post at the same time as each other and one inevitably overriding the work of the other. Unfortunately, it's a known bug that it is meant to release this edit lock when the post is thereafter saved, so that others can edit again, but it does not always. So I would suspect what you're seeing is someone else clicking the edit button and disabling the manage button.

The only way to fix this is to manually release locked posts, and I would not be shocked if you go into the log_locks table of your database you'll find these posts you cannot edit are locked by someone that isn't you. So just pop into the database, find the log_locks table and manually remove them.

And once you've done that you can get into... application/sources, and open up topic.php, in public function topic_manage(), you'll find 

            $ananke->load_language( (!empty($user->language) ? $user->language : $settings->language), 'forums');
            $page->edit = $chronos->single_post($message);
            $page->lock = $chronos->check_lock($message);
            $page->topic = $chronos->load_topic($topic);
            $page->forum = $chronos->single_forum($page->topic->board);
            
            if($user->guest || (!$user->power && $user->id != $page->edit->poster && empty($page->forum->jointpost)))
            {
                  $erebos->redirect_exit($settings->url.'/topic/'.$data['data'][0]);
            }
            if($page->lock && $page->lock != $user->id)
            {
                  $erebos->redirect_exit($settings->url.'/topic/'.$data['data'][0]);
            }
            if(!$page->lock)
            {
                  $chronos->create_lock($message);
            }
			$page->title = $text->button->manage.' '.$text->label->post.' '.$text->in.' '.$page->topic->name;

So what we're going to do is we're going to comment the part that checks for a page lock, and then we'll comment creating one, so it will just temporarily disable the edit lock system until we can get it working right in Salerno.

            // $page->lock = $chronos->check_lock($message);
            /* if($page->lock && $page->lock != $user->id)
            {
                  $erebos->redirect_exit($settings->url.'/topic/'.$data['data'][0]);
            }
            if(!$page->lock)
            {
                  $chronos->create_lock($message);
            } */

Watching you bloom in the light of the moon;

Check out my writing blog! All of my fanfiction and eventually my original stories are published here.



Zozma

Trash Mammal

Patron

36Years Young
38 Posts

Thank you! You're a lifesaver!

 

EDIT: It worked. <3 Yay!


user posted image