Error: Uncaught exception 'Error' with message 'Call to undefined function _amazon_make_simple_text_field()' in /srv/bindings/282218447a8c4d62b1f77e5fdec52cf9/code/web/sites/all/modules/contrib/amazon/amazon_media/amazon_media.views.inc:31

In certain conditions, it is possible for the amazon submodules to be higher in weight than the original amazon module. This is because both modules are weighted 0, and there is no specific order to the implementation of hooks when 2 (or more modules) are of the same weight.

The amazon_media module is built such that it relies on the amazon module's views.inc file to be loaded before amazon_media's is. This isn't garenteed. An easy way to emulate this effect is to use a `hook_module_implements()` to switch the order in which `hook_views_data` is called. See that `_amazon_make_simple_text_field` is actually implemented in `amazon/includes/amazon.views.inc`

Since this is the case, we should techincally be calling a module_load_include to get that file included. Patch to follow soon.

Comments

generalredneck created an issue. See original summary.

generalredneck’s picture

Status: Active » Needs review
StatusFileSize
new774 bytes

This was the only place I could find where we make the assumption that the include was already loaded. I think this is all we will need.