View Issue Details

IDProjectCategoryView StatusLast Update
0001744Composrcns_forumpublic2015-02-12 19:49
ReporterPatrick SchmalstigAssigned ToChris Graham 
SeverityMinor-bug 
Status closedResolutionfixed 
Product Version 
Fixed in Version 
Summary0001744: Fatal PHP error with quick replies when permission for quick replies is turned off
DescriptionPHP NOTICE [8] Undefined index: may_use_quick_reply in sources/cns_topicview.php on line 651 (version: 9.0.16, PHP version: 5.4.35, URL: /pg/polls/view/5)

The line reads:

if ((array_key_exists('message_comcode',$_postdetails)) && (!is_null($_postdetails['message_comcode'])) && (strlen($_postdetails['message_comcode'])<1024*10/*10kb limit, for reasonable performance*/) && ($topic_info['may_use_quick_reply']) && (!array_key_exists('intended_solely_for',$map)))

---

When you visit any form of topic where a quick reply box is to be shown, the site will fatally error if the quick reply permission for that user is not active.
Steps To Reproduce1. Go into the Admin Zone
2. Go into permissions
3. Disable quick reply for certain usergroups
4. The members who fall in usergroups that do not have permission to use quick reply will get a fatal PHP error whenever they go to a location on site where they'd typically be presented with a quick reply box.
TagsNo tags attached.
Time estimation (hours)
Sponsorship open

Activities

Chris Graham

2015-01-06 13:38

administrator   ~0002399

Sorry for the bug, hotfix coming...

Chris Graham

2015-01-06 13:39

administrator   ~0002400

Automated response: Error if quick reply privilege is not enabled

We fixed a subtle quick reply bug in the latest release, but unfortunately introduced a new one.

If quick reply privilege is not enabled, topic viewing will not work.

A workaround would be to enable quick reply, as it is not a dangerous permission to assign (and is on by default). Otherwise, apply this hot fix.

Chris Graham

2015-01-06 13:39

administrator   ~0002401

Fixed in git commit dd24273 (https://github.com/chrisgraham/Composr/commit/dd24273 - link will become active once code pushed)

A hotfix (a TAR of files to upload) have been uploaded to this issue. These files are made to the latest intra-version state (i.e. may roll in earlier fixes too if made to the same files) - so only upload files newer than what you have already. Always take backups of files you are replacing or keep a copy of the manual installer for your version, and only apply fixes you need. These hotfixes are not necessarily reliable or well supported. Not sure how to extract TAR files to your Windows computer? Try 7-zip (http://www.7-zip.org/).

hotfix-1744, 2015-01-06 2pm.tar (37,376 bytes)

Patrick Schmalstig

2015-01-10 15:55

administrator   ~0002407

The github link does not function :(

Chris Graham

2015-01-11 23:19

administrator   ~0002432

Read the text properly ;).

Patrick Schmalstig

2015-01-11 23:52

administrator   ~0002433

I did, but I thought "link will become active once code pushed" meant when the hotfix was made.

Chris Graham

2015-01-12 20:24

administrator   ~0002444

We'll amend that text for future hotfixes. It means "push" in the git sense, pushing the code to github. Our hotfix script can't do that, I need to manually type a command every now and then.

The hotfixes are always uploaded immediately to the tracker issue, and that's generally what users should get.

Patrick Schmalstig

2015-02-12 19:28

administrator   ~0002555

I'm re-opening this issue. Although the hotfix does prevent the error, it also gets rid of the "reply" button and seems to also ignore permissions (Administrators can't use quick reply either). So when the hotfix is in place, no one can post anything.

Chris Graham

2015-02-12 19:49

administrator   ~0002556

That's definitely not the case. The change is in a branch of code that only effects quick reply, definitely not the reply button. I suspect there's something else, such as the topic closed, or double post permission not being there and the test user being the last poster.

Issue History

Date Modified Username Field Change