Closed (fixed)
Project:
Acidfree Albums
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Jun 2006 at 10:06 UTC
Updated:
28 Aug 2006 at 13:32 UTC
Jump to comment: Most recent file
Comments
Comment #1
vhmauery commentedIt looks like $acidfree_types is not set correctly. Are you sure you installed acidfree correctly? What does acidfree/test look like?
Comment #2
Andrupal commentedI'm having the same issue except at different line numbers. Perhaps we are running different cvs versions...?
* warning: array_keys() [function.array-keys]: The first argument should be an array in /modules/acidfree/acidfree.module on line 2009.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /modules/acidfree/acidfree.module on line 2009.
When I run acidfree/test, I see no problems.
Comment #3
vhmauery commentedTry installing the latest version of acidfree (currently 1.62.2.25) and see if it goes any different. It is possible that somehow the wrong value of acidfree_types got stored in your database. It is cached for performance reasons.
To fix this, you might try the sql query:
and then simply hitting submit on the admin/modules page to flush the menu cache.
Comment #4
Andrupal commentedI've uploaded v 1.62.2.27, dropped all acidfree tables, system table entry, and variable entries, and allowed the module to reinstall all databases entries. The problem remains.
Comment #5
gmak commentedI am getting the same behaviour with module version 1.62.2.29 and CVS versions. I do not OG installed.
I've tried deleting the entry from the variable table. Problem persists.
I've tried removing all references to Acidfree from the database (all tables and all modifications to other tables). Problem persists.
the warning is:
warning: array_keys(): The first argument should be an array in /home/httpd/vhosts/maadlab.com/httpdocs/modules/acidfree/acidfree.module on line 1966.Comment #6
beakertrail commentedSame problem as the last description. On all Acidfree pages I get warning: array_keys(): The first argument should be an array in /usr/local/psa/home/vhosts/website/httpdocs/modules/acidfree/acidfree.module on line 1966.
I do not have any of the image manipulation tools installed but the acidfree test page shows no error.
This is the most current version as of today with the most recent drupal release.
Also, when adding an image the image add page goes blank after submitting and the image does not get added.
Comment #7
markcaldwell commentedI'm having exactly the same problem on a new installation of Drupal. I added the filemanager from CVS then Acidfree before getting the array_keys() error on line 1966.
Drupal 4.7.2 (http://ftp.osuosl.org/pub/drupal/files/projects/drupal-4.7.2.tar.gz)
Acidfree 4.7.0 (http://ftp.osuosl.org/pub/drupal/files/projects/acidfree-4.7.0.tar.gz)
Filemanager CVS (http://ftp.osuosl.org/pub/drupal/files/projects/filemanager-cvs.tar.gz)
The Acid free test page comes back with:
No errors were detected. But this doesn't mean that Acidfree is guaranteed to work flawlessly. It is a complex system and still under development. Please be patient while all the wrinkles are found and ironed out.
I've tried DELETE FROM variable WHERE name='acidfree_types'; but that hasn't worked. I've also tried removing both modules and adding them back in again too.
Comment #8
xtony commentedHello guys,
Firstly, i don't know much about this module. just started using it.
i think 'acidfree_make_breadcrumbs' shouldn't be called by 'acidfree_form' (acidfree.module 1035-1036) because node information passes to 'acidfree_form' does not match the one which '_acidfree_get_parent' wants. lets drupal do this job.
Any idea?
Comment #9
xtony commentedHello,
follow up my post, 'acidfree_form' still have to call 'acidfree_make_breadcrumbs'. Sorry for the mistake :)
I have placed a condition check for node information which compatible with '_acidfree_get_parent'.
Please review my patch again.
Comment #10
vhmauery commentedThere are two different array_keys problems here. I fixed one of them in CVS.
The original problem, related to OG, I am not sure what is going on. The problem seems to be that $acidfree_types is not getting set correctly and it not an array in the function _acidfree_get_class_from_path, which gets called to determine which acidfree type to create. What is the path you are using to add a new item with OG?
Comment #11
xtony commentedHello vhmauery,
are these problems caused by OG? I never use the OG module, so i don't know what the problems are.
Can you tell me more about this bug? perhaps i could help.
Comment #12
vhmauery commentedOG has been a thorn in my side ever since I released Acidfree. The two just don't play well together. I am half tempted to say Acidfree is not supported with OG and close all the OG related bugs. Maybe even go as far as adding horrible warning messages to the acidfree init stuff that checks to see if OG is installed.
I am not sure why the problem exists, but evidently trying to add an album to an OG group causes problems. The thing I would like to know is what is the drupal path when you try to do this. Normally, adding an album looks like node/add/acidfree/album and possibly has a /number suffix to say which album to add it to. The thing I am worried about is that maybe OG is doing something funky that calls this page indirectly or from a different path and it messes things up for acidfree.
Comment #13
xtony commentednode/add/acidfree is the path for adding album
node/add/acidfree/photo,video,mass is for the rest.
when did you patch the first problem? did you use my patch?
I don't know what happen here. but i just removed my patch from the module and only the patch from http://drupal.org/node/73349 left. the warning message should be up. but there is no problem at all.
then i copied the original acidfree.module and class_video.inc files from my backup to the module.
now the warning message is back. even when applied the http://drupal.org/node/73349 patch.
Maybe i'm too sleepy to do thing now.
Comment #14
beakertrail commentedWhat the issue:
warning: array_keys(): The first argument should be an array in /home/httpd/vhosts/maadlab.com/httpdocs/modules/acidfree/acidfree.module on line 1966.
I get this with CVS and 4.7
I dont have OG installed.
Comment #15
vhmauery commentedBeakertrail,
You need to get the latest version of Acidfree. Previous comments in this bug say two things: A) what you are seeing is already fixed and B) what you are seeing is a different problem than the OG warnings.
Comment #16
ysanchez commentedI have the same problem. I downloaded the latest version of Filemanager (cvs) and Acidfree (4.7) today. It's a fresh install. I don't use OG module. The Acidreefree test page report no errors. Here is the error message I have:
warning: array_keys() [function.array-keys]: The first argument should be an array in /www/html/drupal/sites/asclub.unige.ch/modules/acidfree/acidfree.module on line 2144.
warning: in_array() [function.in-array]: Wrong datatype for second argument in /www/html/drupal/sites/asclub.unige.ch/modules/acidfree/acidfree.module on line 2144.
warning: array_keys() [function.array-keys]: The first argument should be an array in /www/html/drupal/sites/asclub.unige.ch/modules/acidfree/acidfree.module on line 2151.
warning: in_array() [function.in-array]: Wrong datatype for second argument in /www/html/drupal/sites/asclub.unige.ch/modules/acidfree/acidfree.module on line 2151.
Tx
Comment #17
vhmauery commentedAll y'all should try the latest acidfree to see if it is fixed. I changed the way acidfree_types gets set up in revision 1.62.2.44. I am pretty sure this is fixed. If you are still getting these errors, reset the status to active.
Comment #18
Obi-Wan@hispa-net.com commentedHi.
Acidfree still shows this errors when i am working with albums
warning: in_array(): Wrong datatype for second argument in /home/hispa-net/drupal/public_html/modules/acidfree/acidfree.module on line 2018.
warning: in_array(): Wrong datatype for second argument in /home/hispa-net/drupal/public_html/modules/acidfree/acidfree.module on line 2018.
The test doesn't show any problem. I am using drupal 4.7.3, acidfree 4.7.0 and Filemanager CVS module. I don't use the OG module.
Comment #19
vhmauery commentedObi-Wan, try this patch and see if it helps.
Comment #20
vhmauery commentedComment #21
Obi-Wan@hispa-net.com commentedBy the moment that patch fixed all warnings.
Thanks.
Comment #22
vhmauery commentedokay, I committed the patch. It is fixed in revision 1.62.2.49. It should be repackaged and available within 12 hours or so.
Comment #23
vhmauery commented