MyBB Community Forums

Full Version: Can’t edit post or author
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Problem: Script based stuff isn't working. Cannot choose edit style (eg, quick or full), can't quick-change accounts from the drop down :/

Evidence:

Example when hitting 'edit'; should get a dropdown offering to quick or full edit the post. Instead it is just going directly to the full edit page:
https://i.gyazo.com/e7064e56f425936aecb8...178e35.mp4

Clicking on this arrow should open up the menu to change the post author account. But its not doing anything what-so-ever:
https://i.gyazo.com/82e3b71de5436308aaeb...2637e9.mp4

Any and all help would be outstanding Sad
I'm pretty sure its the scrip that broke? But I literally haven't touched it so I have *no* idea. When I swap to the myBB Default layout, the dropdown menus are in action once more, so I *know* its layout related. But I dn't know where to start looking.

Code:
http://pern.second-pass.net/forum/

You can log in with
Visitor / 3yespy

It has a subaccount linked and you can post in one of the OOC forums to test if you need to. 


Many, many thanks <3
exactly which version of MyBB you are using & which theme ?

below errors need checking. [can't devote time at present]
Quote:TypeError: $(...).popupMenu is not a function showthread.php:3890:3
TypeError: $(...).popupMenu is not a function showthread.php:4461:4
TypeError: $(...).error is not a function showthread.php:4466:3
ReferenceError: cookieSecureFlag is not defined
Hi, .m., thanks for taking a look!

I have MyBB version 1.8.22
PHP is 7.2.30
MySQL is 5.6.47

The theme is from here, with a lot of editing. However, as i said, I haven't made any edits recently. My admin log says I haven't edited the showthread.php in weeks. The log does say I edited the postview.css on the 21st and 26th, but I am sure there were no issues with the edit buttons after that, which is a huge part of why I'm so confused.

This is the showthread template;
<html>
<head>
<title>{$thread['subject']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
	var quickdelete_confirm = "{$lang->quickdelete_confirm}";
	var quickrestore_confirm = "{$lang->quickrestore_confirm}";
	var allowEditReason = "{$mybb->settings['alloweditreason']}";
	lang.save_changes = "{$lang->save_changes}";
	lang.cancel_edit = "{$lang->cancel_edit}";
	lang.quick_edit_update_error = "{$lang->quick_edit_update_error}";
	lang.quick_reply_post_error = "{$lang->quick_reply_post_error}";
	lang.quick_delete_error = "{$lang->quick_delete_error}";
	lang.quick_delete_success = "{$lang->quick_delete_success}";
	lang.quick_delete_thread_success = "{$lang->quick_delete_thread_success}";
	lang.quick_restore_error = "{$lang->quick_restore_error}";
	lang.quick_restore_success = "{$lang->quick_restore_success}";
	lang.editreason = "{$lang->postbit_editreason}";
// -->
</script>
<!-- jeditable (jquery) -->
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/report.js?ver=1800"></script>
<script src="{$mybb->asset_url}/jscripts/jeditable/jeditable.min.js"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/thread.js?ver=1800"></script>
{$mentionScript}</head>
<body>
	{$header}
	{$threadnotesbox}
	{$pollbox}
	<div class="float_left">
		{$multipage}
	</div>
	<div class="float_right">
		{$newreply}{$dbt}
		<if $mybb->user['uid'] != 0 then>  <else> </if>
	</div>
	{$ratethread}
	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder tfixed clear">
		<tr>
			<td class="thead">
				<div class="float_right">
					<span class="smalltext" style="letter-spacing: 0px;">
					</span>
				</div>
				<div>
					{$thread['threadprefix']}{$thread['subject']}
				</div>
				{$thread['description']}			</td>
		</tr>
<tr><td id="posts_container">
	<div id="posts">
		{$posts}
	</div>
</td></tr>
		<tr>
			<td class="tfoot">
				{$search_thread}
				<div>
					<strong>&laquo; <a href="{$next_oldest_link}">{$lang->next_oldest}</a> | <a href="{$next_newest_link}">{$lang->next_newest}</a> &raquo;</strong>
				</div>
			</td>
		</tr>
	</table>
	<div class="float_left">
		{$multipage}
	</div>
	<div style="padding-top: 4px;" class="float_right">
		{$newreply}{$dbt}
	</div>
	<br class="clear" />
	<a name="switch" id="switch"></a>{$quickreply}
	{$threadexbox}
	{$similarthreads}
	<br />
	<div class="float_left">
		<ul class="thread_tools">
			<li class="printable"><a href="printthread.php?tid={$tid}">{$lang->view_printable}</a></li>
			{$sendthread}
			<li class="subscription_{$add_remove_subscription}"><a href="usercp2.php?action={$add_remove_subscription}subscription&amp;tid={$tid}&amp;my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a></li>
			{$addpoll}
		</ul>
	</div>

	<div class="float_right" style="text-align: right;">
		{$moderationoptions}
		{$forumjump}
	</div>
	<br class="clear" />
	{$usersbrowsing}<!-- PLUGIN_USERS_BROWSED_TOPIC -->
	{$footer}
	<div id="thread_modes_popup" class="popup_menu" style="display: none;"><div class="popup_item_container"><a href="showthread.php?mode=linear&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}" class="popup_item">{$lang->linear}</a></div><div class="popup_item_container"><a href="showthread.php?mode=threaded&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}" class="popup_item">{$lang->threaded}</a></div></div>
	<script type="text/javascript">
	// <!--
		if(use_xmlhttprequest == "1")
		{
			$("#thread_modes").popupMenu();
		}
	// -->
	</script>
	<script type="text/javascript">
		$(".author_avatar img").error(function () {
			$(this).unbind("error").closest('.author_avatar').remove();
		});
	</script>
</body>
</html>
you can remove below code segment from above template
<script type="text/javascript">
	$(".author_avatar img").error(function () {
	$(this).unbind("error").closest('.author_avatar').remove();
	});
</script>

also multiple loading of jQuery needs to be checked.
(from headerinclude template)

below might need removal
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

edit: below needs to be added into headerinclude template
var cookieSecureFlag = "{$mybb->settings['cookiesecureflag']}";
you can add it after :
var cookiePrefix = "{$mybb->settings['cookieprefix']}";
Thanks again, .m. - but it doesn't appear to have made any difference :/
have you tried hard refreshing browser / tried with another browser ?

quick edit worked for me [see this image (firefox)]
:/

Nope; I did a hard refresh but it didn't work, so I cleared the cache of both Google Chrome and FireFox and neither are working.

I even tried MS Edge, and it was the same result :|
I've requested a friend from MyBB Team to check the issue. He said :
Quote:Have no issues with quick reply and quick edit.
(2020-05-30, 01:47 PM).m. Wrote: [ -> ]I've requested a friend from MyBB Team to check the issue. He said :
Quote:Have no issues with quick reply and quick edit.

I logged in as the Visitor account, and everything worked as yous aid it is. But it still isn't working on my account (Administration) and I know it wasn't working for my Super Moderator or fellow Admin. After changing a couple of accounts, it looks like its now JUST the admin accounts that aren't working?

I am so incredibly confused, but thank you so much for your help thus far!!
^ would you like to PM me your login credentials to your forum
if admin panel uses secret pin then also provide it.

probably I'll be able to check it after about 1 hour from now
Pages: 1 2