Python Forum
error while previewing locked post
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error while previewing locked post
#1
I got the following error message when I edited, then previewed the locked post in the lock test thread.
I only removed the "locked" flag, but left the edit message intact, then clicked "preview", not saving anything


Quote:The following warnings occurred: Warning [2] Illegal string offset 'locked' - Line: 97 - File: inc/plugins/lockposts.php PHP 5.5.9-1ubuntu4.13 (Linux)

File
Line
Function/inc/plugins/lockposts.php
97
errorHandler->error
/inc/class_plugins.php
139
lockposts_checkbox
/editpost.php
927
pluginSystem->run_hooks

I got the same error message when editing a locked thread, then previewing, not unlocking anything. Seems to have to do with previewing locked posts
Reply
#2
That might be because i deleted all my test users i was using.
Recommended Tutorials:
Reply
#3
Negative, this pertains to other users as well. You can try for yourself: Just edit Yoriz' thread here, full edit, then click preview. Error appears at the very top: http://python-forum.io/showthread.php?tid=30
Reply
#4
OK I see...

Well it does successfully edit the post, because its a warning, not error. But I think the plugin is thinking its still locked when its not, and sparking a warning. I asked the support how to remedy this as i am not sure.

The if condition triggering that is
	if($postoptions['lockpost'] == 1 || ($mybb->request_method != "post" && $post['locked'] != 0))
	{
		$postoptionschecked['lockpost'] = " checked=\"checked\"";
	}
from lockposts.php
http://codepad.org/bXGxQppX
Recommended Tutorials:
Reply
#5
I modified the settings in which make this plugin impractical. I removed the ability for regular users to delete their own threads or posts. And they have 10 minutes from the time of posting that their post auto locks. I put the time limit in there for people who mess something up and want to go back and fix. But that should stop the people who get an answer and delete their post or edit it to gibberish. But ill leave the lock mod on just in case.
Recommended Tutorials:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  post error from cloudflare Skaperen 12 7,996 Jun-25-2022, 11:37 PM
Last Post: Larz60+
  indents disappearing from output after previewing post Crackity 14 8,739 Jul-25-2017, 03:31 PM
Last Post: metulburr
  [split] My Posts are locked wavic 9 8,917 Oct-05-2016, 07:01 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020