Improve compatibility with Drupal 6.x

Rosamunda - January 29, 2009 - 21:41
Project:Comment Permissions
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

Well, that´s it. This dev 6 version isn´t compatible with last D6.
Please upgrade it, this module is terrific!
Thanks!

#1

matt2000 - February 9, 2009 - 20:13

Subscribing. I will probably be working on solving this myself this week if another solution does not appear.

#2

black silence - February 11, 2009 - 08:50

*appear*

- makes this 'd6 version' compatible with d6 (i think it was just a copied d5 version)
- integrates with quote module if enabled, hides quote link if comment link is hidden

AttachmentSize
comment_perm_d6.patch 3.03 KB

#3

Rosamunda - February 11, 2009 - 22:39
Status:active» needs work

I´ve installed the patched version.
So far:
When I enter the "Comment Permissions" link inside admin, I access the page, with this error:

warning: Invalid argument supplied for foreach() in ...\includes\form.inc on line 1192.

function form_type_checkboxes_value($form, $edit = FALSE) {
  if ($edit === FALSE) {
    $value = array();
    $form += array('#default_value' => array());
THIS IS THE 1192 LINE =======>   foreach ($form['#default_value'] as $key) {
      $value[$key] = 1;
    }
    return $value;
  }
  elseif (!isset($edit)) {
    return array();
  }
}

Otherwise that error, it seems to be working.

#4

Rosamunda - February 16, 2009 - 13:28

I´ve tried reinstalling the module, but the problem is still there.

#5

Rosamunda - February 22, 2009 - 15:02

This module is so important, because permissions are globally treated in Drupal.

#6

black silence - February 24, 2009 - 08:19

i had this error, too. but only the first time, before i enabled some comment permissions

#7

Rosamunda - March 10, 2009 - 04:10

Any news about this?

#8

Rosamunda - March 15, 2009 - 03:42

It won´t work with Drupal 6.10 either.

#9

Rosamunda - March 19, 2009 - 01:47
Priority:normal» critical

As it´s not compatible with core 6.x version, I´ll change this to critical.

#10

raspberryman - April 6, 2009 - 20:19
Title:Not compatible with Drupal 6.9 » Improve compatibility with Drupal 6.x
Status:needs work» needs review

This patch gets the module working on 6.10. Rosamunda - I didn't investigate your error message, but on first glance I did not see it. So this patch may or may not fix it.

AttachmentSize
comment_perm_d6.patch 3.67 KB

#11

Rosamunda - April 7, 2009 - 14:00

I´ll try it out. Thanks Tony!

#12

black silence - April 7, 2009 - 15:08

i don't see a difference to my patch from #2

as i said, that error message appeared only the first time, when i had no permissions set. after doing that, everything was fine and worked as expected

the project where i used this module is finished for me, so i will not try to fix this

#13

Rosamunda - April 21, 2009 - 23:57

Any idea of why a second install with the patched version, on a fresh D.6.10 could make this module incompatible with D 6.10 again?
I´ve patched the same way as I did in localhost (and there it worked)...
Thanks for your help!!

Rosamunda

#14

Rosamunda - April 22, 2009 - 04:11

Sorry, my bad, I forgot to patch the .info file.
Have to stop drinking too much coffee you know.
Sorry :)

#15

EvanDonovan - May 27, 2009 - 19:45

Patch in #10 works except for on the .info file. I got HUNK #1 OF 1 FAILED on that. However, it looks like the change to dependencies[] was already in the module.

#16

EvanDonovan - May 27, 2009 - 19:46

This issue is still, of course, critical. If the maintainer is out there, can they please commit a patch for this?

#17

livido - May 29, 2009 - 04:20

Here is the version 6.

I added also permission for "edit own conment".

AttachmentSize
comment_perm.zip 9.06 KB

#18

Rosamunda - May 29, 2009 - 14:02

Thanks! I´ll check it out!

#19

John Morahan - June 23, 2009 - 16:21

Here's livido's version as a patch, with some minor coding style fixes and a fix for the form error.

The maintainer seems to be awol though...?

AttachmentSize
comment_perm-d6.patch 11.01 KB

#20

bratsun - July 17, 2009 - 11:37

I receive

Fatal error: Cannot use object of type stdClass as array in /var/www/drupalbase/htdocs/sites/all/modules/comment_perm/comment_perm/comment_perm.module on line 162

with the core 6.13

but the idea of the module really rocks.

to overcome the error with little time spent on the task, i decided to alter templates with following conditions

if (in_array('Client', array_values($user->roles)) && $node->type=='blog') {

do smth

}

for ex, u can add extra class to wrapper and hide the links. not a pretty solution, but still it works.

all the best

#21

omerida - July 29, 2009 - 21:42

Patch in #19 didn't apply cleanly for me, got hung up on the .info file, here's a re-rollled patch that should apply without problem.

AttachmentSize
comment_perm-d6.patch 10.17 KB

#22

adam_b - August 10, 2009 - 20:08

subscribing... I'd like a D6 version too

#23

Rosamunda - August 16, 2009 - 15:59

I´ve installed the patched version, and it works just as it should.
THANKS!!

#24

lejonsson - August 18, 2009 - 18:59

Rosamunda,

Which patch works, the one in #21?

#25

Rosamunda - August 18, 2009 - 22:28

Yup. I´ve successfully tried #21.

#26

himagarwal - September 22, 2009 - 07:21

I can't install this module. In the module page (admin/build/modules/list) it says:

This version is incompatible with the 6.14 version of Drupal core.

#27

EvanDonovan - September 22, 2009 - 14:49

@himagarwal:

Did you apply the patch first?

@all:

Has anyone heard from the module maintainer recently? We should decide which version of the patch is RTBC, change issue status, and then if the maintainer doesn't respond within a week or so, we should petition to have a new maintainer for this module. I'm currently using the patched version of it (patch from #10, with a few modifications to make it apply), but I am not excited about the fact that there is no stable, maintained release (especially because the actual functionality is so useful).

I wish I had thought of it, but more granular comment permissions would have been great for Drupal 7. Oh well.

#28

omerida - October 9, 2009 - 17:30

@EvanDonovan - we're using the D6 patch (#21) on production here and I'd be glad to help maintain a D6 version of the module. I have another patch, that I haven't submitted. How do we petition to have a new maintainer?

#29

omerida - October 9, 2009 - 17:42

I created an issue here http://drupal.org/node/600332, so hopefully we'll have some movement.

#30

stBorchert - October 10, 2009 - 09:48

I've updated the patch and fixed some minor issues (e.g. initial comment state is "read/write" instead of "disabled").

Patch is based on HEAD.

AttachmentSize
comment_perm-D6-30.patch 14.59 KB

#31

benshell - October 21, 2009 - 20:37
Status:needs review» fixed

I updated the D6 dev version with this patch, and some additional features (#489314: Comment without approval by role and #539844: Patch to add Comment on Own permission by content type). I'm sorry I haven't been more responsive as a maintainer. Since I started this a lot has changed for me personally. In particularly I'm now working for a different company that is much less supportive of open source. I'd be happy to have someone take over as maintainer.

#32

System Message - November 4, 2009 - 20:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.