Hi .
I tried to install the category(cac) module on localhost for test it , but when i am going to the this part (http://mysite/?q=admin/access/cac_lite ) of admin area , I have an error with this topic (Fatal error: Cannot use string offset as an array in \modules\system\system.module on line 1076 )
( this problem is with dropal 5.1 )
Please help me to correct it .
tanks

CommentFileSizeAuthor
#10 129052.diff1.14 KBDave Cohen
#8 cac_lite-fatal_error.jpg52.16 KBSabbeRubbish

Comments

dcine’s picture

I have the same problem. One solution? (please)

Barry Collins

MikeyGYSE’s picture

Priority: Normal » Critical

I have the same problem!

Dabitch’s picture

I also have a problem which is most likely related - I get a blank page, that is nothing at all when I try and access admin/access/cac_lite

I also posted that here.

http://drupal.org/node/139434

laurenthdl’s picture

Same problem here.

SabbeRubbish’s picture

I have this probleem too.

And of course, without the configuration of cac_lite, no categories can be browsed, or posts viewed.
If i disable the module, *sometimes* I can view a category or container, sometimes not...

This really needs a fix soon.

Thanks!

Dave Cohen’s picture

I tried to reproduce this problem but could not.

Question for those who can reproduce it: have you created any containers?

Dave Cohen’s picture

Title: A problem with category module » Error on cac_lite administration page

Issue titles can be useful, if used properly.

And to SabbeRubbish, without cac_lite configured, all categories and containers can be viewed. If you can't view them, you have another problem.

SabbeRubbish’s picture

StatusFileSize
new52.16 KB

Dear yogadex,

The problem is that I can't configure cac_lite, just like others on this issue..
So what I did:
* I turned ON cac_lite (as everything "quite" works without, but rather unstable)
* No anonymous user or any other user can view any category content
* I go to administer and I see the cac_lite tab.
* I click it and (as I expected of course), it breaks (see screenshot).

I am running drupal 5.1 and category module v1.1 (2007/01/05) drupal packaging 5.x-1.1.

I checked for the latest (stable) version, but it is the same as mine.

To your question about the containers: yes of course I made a container:
General Root*
-- About <>
-- Music
-- In Practice

All categories have pages under them. I have a second container with one category, purely for news articles. And yes, I am aware that (upon enabling cac_lite), I must edit and save all nodes again, but that didn't work either, due to the administration page failing (I think).

Thank you for taking your time to digg into this issue.

SabbeRubbish

menneke’s picture

I have the exact same issues as SabbeRubbish:

  • error on line 1076 when trying to access cac-lite from Administer.
  • visitors can not access any of my pages (403 error).
  • when updating a container I get: cac_lite module has been installed, but has not been configured.

Your wisdom is appreciated.

Dave Cohen’s picture

StatusFileSize
new1.14 KB

To everyone who can reproduce this bug: are you using PHP 5?

If so the attached patch might help. I have not reproduced the problem, so I really don't know.

Please apply the patch and let me know if it changes anything.

Phoenix77’s picture

I have the same problem and I am running PHP 5.2.1.

I have seen this issue before and it has to do with changes made in PHP 5.x.

See http://bugs.php.net/bug.php?id=31303 for more information and

Error is caused in the vcategory module in the 'Settings form' part lines 293 till 375. The function call on line 374 calls the function system_settings_form in the system module on line 1075.

The error is raised when $form['buttons']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration') ); is called. Probably because the array that should contain the ellements #type is empty.

Hope this helps.

The Phoenix

Phoenix77’s picture

I was using the version of 2007-Feb-02, installing the Development snapshot from 2007-Apr-08 fixed the issues with the error Fatal error: Cannot use string offset as an array in \modules\system\system.module on line 1076 on my drupal 5.1 installation using PHP 5.2.1.

Phoenix77

Dave Cohen’s picture

Yes, I suspect this occurs only in PHP 5, and the eventual fix will be in the system module. In fact, I'm surprised this is showing up in cac_lite and not lots of other modules. So I expect the folks reporting it here will have similar problems with other contrib modules.

I'm waiting for someone to apply that patch and tell me if it makes a difference. Not easy for me to test on PHP 5.

SabbeRubbish’s picture

Hi all,

I've tried numerous ways of applying the diff on Windows, but none have succeeded this far... I've tried the UnxUtils patch but it crashes on patch.c on line 321 or so...

It's a rather small diff, so what do I have to change (so give me small hints on how to apply the patch file manually please)?

I have PHP5 and can test it without a problem, but I need to be able to patch somehow right? :p

Greetz,

SabbeRubbish

Dave Cohen’s picture

I may have made the patch in a funny way. It might have to be applied from the modules/category/contrib directory.

To make the change manually, find cac_lite.module. There are two places where it calls system_settings_form(). Immediately before each of those calls, add this code:

    // attempt to address #129052
    $form['buttons'] = array();
SabbeRubbish’s picture

Dear yogadex,

Thank you for the explanation and my apologies for my "diff" clumsyness.
I've applied the patch, but the same error pops up (I already activated and reactivated that module just in case - for cache's sake and stuff).

I'm sorry it still doesn't work, don't know what else could be wrong.

SabbeRubbish

bacchus101’s picture

I just wanted to state that I am getting this error as well and am on a PHP 5 box.

The scary part is that if I edit a story it disappears from non-admins and I assume the only way to get it so that they can see it is to make a change in cac_lite. When I attempt it I pop the error everyone else is describing verbatim.

If I turn off cac_lite then non-authenticated users can not see anything of the stories so I am in somewhat of a predicament ;)

....guess I am going to go fire up phpmyadmin and see if I can find the tables that are locking down access.

bacchus101’s picture

The april 8th version fixed it for me as well. Thanks for the heads up Phoenix.

bwong’s picture

I found that the call to system_settings_form was off. The Drupal 5.1 version I was running takes only a single parameter so making the following change twice fixed the problem.

$output .= system_settings_form($form);
// $output .= system_settings_form('cac_lite_admin_settings', $form);

sandraqu’s picture

bwong - in what file and on what line did you make this change?

bdragon’s picture

Version: 5.x-1.1 » 5.x-1.x-dev
Status: Active » Fixed

5.x-1.1 is indeed broken. Try 5.x-dev instead.
(I REALLY need to roll a release soon...)

Anonymous’s picture

Status: Fixed » Closed (fixed)