Unsupported operand types in sites\all\modules\contrib\manualcrop\manualcrop.module on line 389. Can you help me with this bug? I need to use latest dev media version for a reason and this is fatal I am getting in manual crop latest dev version.

Comments

merlinofchaos’s picture

Status: Active » Needs review
StatusFileSize
new1.22 KB

This patch fixes the fatal, though I don't know if it fixes it correctly -- it keeps working and seems to do what I would like it to do.

magicmyth’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for the patch merlinofchaos. Its working just fine for me.

matthijs’s picture

Status: Reviewed & tested by the community » Fixed

Patch committed, thanks!

morenstrat’s picture

Status: Fixed » Needs work

I still get this error with the latest Manualcrop dev and Media 2.0-alpha3 on node/add/* fot content types that have field using the media widget:

PHP Fatal error: Unsupported operand types in /var/www/sites/all/modules/manualcrop/manualcrop.module on line 392

bkildow’s picture

Status: Needs work » Needs review
StatusFileSize
new660 bytes

I'm getting the same issue.

Attaching the manualcrop_media_element_process on #after_build at the root of $element, instead of looping over the element_children and attaching it there seems to have fixed it for me ($element var in manualcrop_media_element_process() will then contain $entity_type, $bundle, etc.).

This looks like it was the approach before the patch in #1, so I'm not sure what changed...

matthijs’s picture

This is probably because you're using alpha 3 instead of the latest dev version?

morenstrat’s picture

I can confirm that the patch from #1 fixes the problem only with the latest dev version of the media module, not the alpha3.

It would be nice to have a manualcrop release that goes along with the alpha3 version of the media module. Manualcrop 7.x-1.4 is not an option because it depends on an older Drupal core version.

antonyanimator’s picture

This is fixed when using the latest media dev version.
Unfortunately, there are some bugs in the latest media dev which won't allow me to use it.
Therefore I have to use https://drupal.org/comment/8608583#comment-8608583 version of the media module.

matthijs’s picture

Assigned: Unassigned » matthijs
Status: Needs review » Fixed

I've added a check to determine if a newer version than alpha 3 is being used, if not the previous code will be used.

  • Commit 43900cf on 7.x-1.x by Matthijs:
    Issue #2214687: Fixed compatibility with Media alpha 3.
    

Status: Fixed » Closed (fixed)

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