News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

[3312][2.0 RC1] "quick edit"/"modify inline" bug

Started by Brettflan, March 02, 2009, 04:46:11 AM

Previous topic - Next topic

Brettflan

OK, I've found another bug in RC1. If a user has the option under Profile->"Look and Layout" for "Show quick-moderation on message index as" set to "checkboxes", there are a few page display problems when viewing a topic they have posted in which has posts from other users. I've tested and duplicated this on a fresh install of RC1.

You can easily duplicate this by creating a new user, setting their quick-moderation option as specified to "checkboxes", and then making a new post in an existing topic (don't create a new topic, those display fine initially). When viewing the post afterwards you'll see that the quick edit link image does not show up on the user's post like it should, and you'll also see the the board jump box at the bottom is missing.
If you go and change the profile option from "checkboxes" to either "icons" or "don't show", you can view the same page and it will display fine. It's only when it's set to "checkboxes" that it has problems.

This problem showed up for me since we had a few people set up as a moderators of specific boards. They have that "checkboxes" option set so they can easily moderate their board(s), but anywhere outside of their board it prevents the quick edit function from working for them.

The problem seems to largely come down to a Javascript bug in the 'InTopicModeration' code in the default theme's Display.template.php (or perhaps in the directly related xml_topic.js file). I've found that a hack to only send the message ids of messages which the user has the privilege to delete instead of sending all message ids to the function seems to basically fix it. This is a rough hack though, and I expect there's a better way to handle it. It does leave checkboxes being displayed on the user's posts, but if the bottom moderation buttonstrip is not shown then the checkboxes obviously serve no purpose.

I've packaged up my workaround so that it can be installed through the package manager; it's attached to this post. Again though, it is a bit of a hack.

SleePy

I can't reproduce this.

  • Added a Test User
  • Made the Test User a Moderator of a board
  • Made a new post in a topic in that board
  • Logged in as Test User
  • Changed My profile to use checkboxes for quick moderation on message index.
  • Viewed the post in the board that the Admin replied to.

    I was able to see the quick edit icon, the checkboxes and the drop down for quick jump.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Brettflan

#2
Quote from: SleePy on March 05, 2009, 11:22:10 PM

  • Made the Test User a Moderator of a board
  • Made a new post in a topic in that board
No, don't make the test user moderator of the board they're posting in. You'll notice I didn't say to do that. :P They need to be a regular user in the board the post is in. So, for this test, there's no need to make this user moderator of anything.
The problem seems to occur when the user doesn't have privileges to delete/whatever all of the posts within the topic. If they're moderator of that specific board, obviously they have such privileges. Also, if all posts in the topic are their own, they again have such privileges.

I did a fresh installation of RC1 and tested it exactly as I outlined above before making this bug report, so I know it is repeatable.

I only mentioned the problem happening with moderators on my forum for context, and I did specify it happened in boards they were not moderator of.

karlbenson

I can replicate it.

I'll try to do some debugging on this over the weekend.

karlbenson

Added to bugtracker http://dev.simplemachines.org/mantis/view.php?id=3312
Unfortunately I've only found half the fix.

Some javascript magic will still be needed.

HecKel

bump on this!

Any news about this? Can you at least give us some fix about this?
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

karlbenson

Having tested myself in a while

Looking at the mod report, it appears that Grudge has fixed the original issue.
But that there may be need for possible tweaks to the fix.

Adish - (F.L.A.M.E.R)

http://www.simplemachines.org/community/index.php?topic=303318.0

That bug is kinda the same as this one. Although i think i have done the same things as mentioned in the OP's post...

Advertisement: