Closed (fixed)
Project:
Auto Admin
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2010 at 15:48 UTC
Updated:
17 Feb 2010 at 16:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
_rune commentedHi
Thx for using Auto Admin. Could you attach a mysql dump of the table and your "[MODULE].autoadmin.inc" file?
Auto Admin should be okay with not having a setting for relation. If that is not the case I will fix it. Fast workaround is:
in "[MODULE].autoadmin.inc".
Take care
Rune
Comment #2
XaraX commentedHi Rune,
Setting an empty relations array did not work, I still get the same error:
Module=autoadmin_phone_book,Table=autoadmin_phone_book: Type of [relations] must be of type array.Please see attached files for mysql dump of the table and the "[MODULE].autoadmin.inc" file.
Thank you
Comment #3
_rune commentedHi
Wauw, I really did have a bug regarding validate of the schema. I have attached a .tar.gz file with a new version of autoadmin and a version of the phone_book module. Please notice that I've created a department table that has a one_to_many relation to the phone_book table as well. If you could please test on your setup I will create a new release and add some unit tests for the validation function.
Cheers
Rune
P.S.: Am wondering why the drush command did not work. It worked fine for me. Here is what I did (on a fresh drupal install):
Maybe you did not enable the phone_book module before running "autoadmin generate"?
Comment #4
XaraX commentedI'm going to try the files you've attached tomorrow on the production server and let you know about it.
The missing piece about my drush generation is the "module_builder" module. I didn't install it because it's not mentioned in Quickstart, Prerequisites and documentation. It'ld be better to update these documents.
Thanks Rune
Comment #5
_rune commentedWell "module_builder" is not a requirement, but there should be a valid module (.info and .module) file, and the module should be enabled. I will update the appropriate docs immediately. Thx for pointing this out!
EDIT: Updated the "Getting started" section on the "Using Auto Admin from the command line" handbook page and the "Quickstart" section on the project page. Again, thx!
Comment #6
XaraX commentedRune,
I've tried the module you've attached. Setting an empty "relations" array works fine now.
One more thing before releasing a new update:
Call time pass reference usage is deprecated, it'ld be better to fix wherever it's used. If you don't set "allow_call_time_pass_reference" to "off" on php.ini, the autoadmin module generates warnings on listing and editing pages:
Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file....Thanks a lot!
Comment #7
_rune commentedHi XaraX
Good to hear.
About the calling of functions like foo(&$bar), it is a copy / paste error I do sometimes. Pasting the function definition and forgetting to remove the "&". Weird I did not see the error messages as I test with "E_ALL|E_STRICT". Will hunt them down before the new release. Thx for catching them!
Have a splendid day.
Rune