Needs review
Project:
Authoring Aliases
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
22 Mar 2009 at 05:07 UTC
Updated:
27 Mar 2009 at 09:01 UTC
Attached is a patch... It seems the $al var is an object, not an array. If the $op is 'unpublish' or 'publish' you need to pick up the object.
I believe this is the same error this issue (http://drupal.org/node/338784) is getting too, though I haven't read through the code...
| Comment | File | Size | Author |
|---|---|---|---|
| authoring_aliases.d5.patch | 1.19 KB | elvis2 |
Comments
Comment #1
elvis2 commentedhere is the error output:
Fatal error: Cannot use object of type stdClass as array -- /home/xxxx/public_html/sites/all/modules/authoring_aliases/authoring_aliases.module on line 199
Comment #2
neochief commentedSorry, I have no way to test it right now under 5.x. Does it work for you? If it is, I can simply commit this patch. Please, confirm.
Comment #3
elvis2 commentedWell, I see that the name change doesn't actually take place. The original user name (admin) is mapped within the auth alias settings but is not being carried over. I will try to check the code again this weekend, my guess is that the function authoring_aliases_comment() needs to be redone.
I am wondering why you are setting these:
$a1['uid'] = $alias['uid'];
$a1['name'] = $alias['name'];
within the if statement:
if ($alias['comments'])
Comment #4
elvis2 commentedOk, I see where the problem is coming from... if you remove
The errors go away and authoring alias works as it was intended. Why would we need to check the publish case? The module is changing the name upon insert and update, and showing the alias name on node loads.