Error after adding existing list
Clemens - March 21, 2007 - 12:42
| Project: | Mailman Manager |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | arturoramos |
| Status: | closed |
Description
At URL: /admin/settings/mailman_manager/add
Click on 'Add'
Results in: Fatal error: Cannot use object of type stdClass as array in /var/www/drupal/includes/theme.inc on line 780
Using theme: Garland
List is actually added and visible in the list overview at URL: /user/1/edit/mailman_manager
Thank you for a great module...

#1
Same error when entering /admin/settings/mailman_manager from 'Administer'
But I can continue adding (existing) lists via: /admin/settings/mailman_manager/add
#2
I do not understand your issue correctly... when you say that this error is being generated when adding an EXISTING list, what exactly does that mean?
I am unable to replicate your error. I am able to add lists from the admin/settings/mailman_manager without any errors.
What do you mean by "existing" lists?
#3
I get exactly the same error.
[I assume that when Clemens talked about "EXISTING list", it is probably a list that was already set up in mailman, and Clemens was just trying to add it in Drupal; but I think that it dos not matter, as Drupal does not try to interact with mailman yet]
Here are the steps that I did so far:
1) Installed mailman_manager-5.x-1.x-dev (20070319)
2) Enabled the module in the ".../modules" page.
3) The "Mailing Lists" of this module appeared in the list in ".../admin" as expected.
4) I went to ".../admin/settings/mailman_manager"; the page appeared probably as expected (I don't have anything to compare it with, but it looks reasonable). It has
5) I press "Add new mailing list" and it goes to page ".../admin/settings/mailman_manager/add"
6) I add the information for a mailman list, and press the "add" button
7) It goes to a page ".../admin/settings/mailman_manager" but it is EMPTY!
8) Checking the website error_log, there is an entry:
9) It looks like nothing happened, but I checked the mySQL database, and there is an entry in the "mailman_lists" table which looks OK.
10) If I go back to the ".../admin" page, and press the "Mailing Lists", it goes to ".../admin/settings/mailman_manager" but the page is EMPTY as well. (and don't have an opportunity to add any additional list, as the page is empty now).
The corresponding error in error_log is:
11) Interesting, but if I go to ".../user/1/edit/mailman_manager", the newly-added mailman list DOES appear there and it looks OK (I haven't tried yet to subscribe to it via Drupal).
12) So the problem may be only in the admin portion.
PS: I did try to delete the entry from the mailman_list table in mySQL. When I do that, the ".../admin/settings/mailman_manager" page become accessible again, as in step (4), and I have the opportunity to continue to (5) etc, and all the problems repeate as described above.
[I am using Drupal 5.1]
#4
I see the same error after adding a list using the mailman admin page.
I have cac_lite installed, but cannot configure with a similar error. maybe look to cac_lite unresolved issue.
1) add a list using a properly rendered module page.
2) click submit
3) receive error
4) check to see if the list was created, yes it is.
5) mailman subscribe command works using mailing lists menu item.
6) subsequent attempts to administer or add a new list receive same error message.
#5
I am also having this same error using Drupal 5.1 and the theme: spreadfirefox, using 5.x-1.x-dev
The only think I can do is add new: admin/settings/mailman_manager/add, and this generates the error:
Fatal error: Cannot use object of type stdClass as array in /home/.lytle/mylogin/mysite.org/includes/theme.inc on line 780
but, like the others here, it does create the mailing list - and it's possible to access it as a user, subscribe, etc - it seems to actually work
- but none of the admin functions/settings work except for 'add' - but this generates an error when adding.
Lovely module, hope to get it working..
#6
You may fix the problem by changing line 445 of mailman_manager.module to
$lists[] = (array) $list;.The reason is that
theme_tabletakes an array as the second parameter. Line 442 of mailman_manager.module iswhile($list = db_fetch_object($result)) {, which makes$listan object.Another fix would be to change the call to
db_fetch_arrayand line 442/3.#7
Thanks for weeding that out. I was just about to post a "me too" to this bug.
The former solution worked for me. Odd that some people just aren't seeing this problem. Differing PHP versions, perhaps?
Anyway, it's only a one-line change but please find attached a patch for review.
#8
had same problem; this fix worked for me
#9
I have changed the call in line 445 to a fetch_array call.
I have also unset a number of the variables in the array so as to improve the list of lists display.