this error occur in Fatal error: Unsupported operand types in /home/modules/languageassign/languageassign.module on line 67

i'm using drupal 7.0 and languageassign 7.x-1.x-dev dated 2011-Feb-25

this are the lines
66 $form['admin']['options']['operation']['#options'] =
67 $options + array(t('Set language') => $LAopts);

Comments

dgastudio’s picture

same here, trying to delete a node:

Fatal error: Unsupported operand types in /home/u2911/domains/******/sites/all/modules/languageassign/languageassign.module on line 66

dgastudio’s picture

and in error log

Notice: Undefined index: admin в функции languageassign_form_node_admin_content_alter() (строка 56 в файле /home/u2911/domains/********/sites/all/modules/languageassign/languageassign.module).
Warning: Invalid argument supplied for foreach() в функции languageassign_form_node_admin_content_alter() (строка 58 в файле /home/u2911/domains/********/sites/all/modules/languageassign/languageassign.module).

Andrew Schulman’s picture

Assigned: Unassigned » Andrew Schulman
Priority: Normal » Major

Thank you for reporting this. Whew, this was a bad one.

I've committed a fix for this bug. It works in my testing. Those of you who've also encountered this problem, please also test it and let me know if it works for you. To test:

  1. Install the next 7.x-1.x-dev release when it becomes available (within the next 12 hours), or, if you prefer, apply the patch.
  2. Clear your site's cache ("Clear all caches" at admin/config/development/performance).
  3. Go to admin/content, select some nodes, and under "Update options" choose "Delete the selected content". Then click on Update.

Without the patch, this operation will give the "Unsupported operand types" error message. After the patch, it should work fine. Please let me know.

Andrew Schulman’s picture

This bug doesn't occur in D6.

Andrew Schulman’s picture

Status: Active » Fixed

Fixed in 7.x-1.2. Please reopen this bug if you think otherwise.

summit’s picture

Hi, I have exactly the same problem, but I am on D6. Trying to delete nodes, and this is not working correctly. Will try to apply the patch.

greetings, Martijn

Andrew Schulman’s picture

Version: 7.x-1.x-dev » 6.x-1.3
Status: Fixed » Active
Andrew Schulman’s picture

Status: Fixed » Active

Martijn, I just committed a patch for this. Please try it out, or wait for the next 6.x-1.x-dev release to become available later today and try that, and see if it fixes the problem for you.

I am surprised by this because although I was able to reproduce this problem in D7, I couldn't reproduce it in D6, so I thought it wasn't a problem there. But there may be an interaction with another module that triggers the error. Since I can't reproduce it here, I need for you to test it and tell me if this patch fixes the problem. If it does, please tell me and I'll issue a new release right away.

Andrew.

summit’s picture

Hi,
I added the patch, but I deleted all content all with disabling the module first.
I will look into it when I have to delete content again. Thanks a lot for your quick reply!
greetings, Martijn

Andrew Schulman’s picture

Would you mind creating a dummy page, then deleting it again, in order to test whether the deletion works?

Andrew Schulman’s picture

Status: Active » Fixed

Marking fixed. I'll release version 6.x-1.4 with this fix.

Status: Active » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.