I get the following notice:

* Notice: Undefined property: Media::$uri in Media->__construct() (line 284 of /Applications/MAMP/htdocs/drupal-7.0-beta/sites/mori.drupal7.dev/modules/media/media/media.types.inc).

* Notice: Undefined index: module in _field_info_prepare_instance_display() (line 346 of /Applications/MAMP/htdocs/drupal-7.0-beta/modules/field/field.info.inc).

CommentFileSizeAuthor
#4 media_url_prop.patch605 bytesJacobSingh

Comments

alex ua’s picture

I'm getting this error as well when I use WYSIWYG to insert images. When I add images via the file browser it works fine, and when I edit the node the media is displayed fine without an error. I've altered all of the settings I could find and made sure that the media filter was on top, but it's still not working. One other oddity: the media filter help text isn't showing up...

Edit: The problem is actually caused because I had HTML filtering on and didn't have the IMG tag as an option (duh). I still get the error with the filter enabled, but I suspect there's another tag I'm missing. Anyway, if anyone else gets this error, it's most likely due to a misconfiguration within the input filters.

drupa11y’s picture

Still get this error e.g. when I was updating the current core to the dev-release from today (2010-11-07):

Notice: Undefined property: Media::$uri in Media->__construct() (line 284 of /Applications/MAMP/htdocs/drupal-7.0-beta/sites/mori.drupal7.dev/modules/media/media/media.types.inc).

alex ua’s picture

Status: Needs work » Postponed (maintainer needs more info)

@mori- did you check your input filter settings?

JacobSingh’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new605 bytes

Spent awhile trying to trakc this down. It is related to a change in the entity module.

if (!empty($this->entityInfo['entity class'])) {
      $result->setFetchMode(PDO::FETCH_CLASS, $this->entityInfo['entity class'], array(array(), $this->entityType));
    }

Of entity.controller.inc. Note the 3rd param sets the constructor args which renders $values to be an empty array every time. Honestly, we may have outlived our need for entity, so perhaps it's time to just get rid of it, but that would also require refactoring.

ugh...

Since we aren't using the code in question now anymore anyway, I'm submitting this. Seems to fix it.

ronald_istos’s picture

Had the same error - and the patch, obviously, makes it go away. However, since I am not quite sure what the implications are I guess this doesn't count as a review.

Would be curious to hear some more about your experiences with Entities and this module and why you may have outlived the need for Entity - but that is a separate issue :-)

JacobSingh’s picture

Status: Needs review » Fixed

That counts as an RTBC to me :)

Short story on Entity was flexible query syntax which was mostly solved with the EntityFieldQueryAPI

Committed.

Status: Fixed » Closed (fixed)

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