Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Publisher is causing an PHP Error when using the Assets 2.0.3 tag pair.

Status Resolved
Add-on / Version Publisher
Severity Critical
EE Version 24

Filip Vanderstappen

Jan 24, 2013

I’m using Assets 2.0.3 on ExpressionEngine 2.5.5 (and Publisher 0.97.6 installed). With the following code in a template:

{exp:channel:entries channel="products" entry_id="15" dynamic="no"}
  {entry_id}
  {products_images}{url}{/products_images}
{/exp:channel:entries}

It’s always resulting in this error (Full stack trace: http://cl.ly/image/2N231A1U0o25):

Fatal error: Call to a member function row() on a non-object in /Users/Filip/Sites/FOSWEB/system/expressionengine/third_party/assets/ft.assets.php on line 1193

When disabling Publisher (with the switch in Publisher settings) the error is gone. When you take a look at the full stack trace you can see it’s passing Publisher.

Cheers,
Filip

#1

BoldMinded (Brian)

Ugh, I’m not seeing that locally either… Will try to dig into it more tonight.

#2

BoldMinded (Brian)

Thanks for the stack trace too.

#3

Filip Vanderstappen

I had the same error when sending a Cartthrob notification mail. Strack trace is here:

[28-Jan-2013 10:46:39 UTC] PHP Catchable fatal error:  Argument 1 passed to Data_filter::sort() must be an array, string given, called in /Users/Filip/Sites/HEMWEB/admin/expressionengine/third_party/cartthrob_order_items/ft.cartthrob_order_items.php on line 142 and defined in /Users/Filip/Sites/HEMWEB/admin/expressionengine/third_party/cartthrob/libraries/Data_filter.php on line 27
[28-Jan-2013 10:46:39 UTC] PHP Stack trace:
[28-Jan-2013 10:46:39 UTC] PHP   1. {main}() /Users/Filip/Sites/HEMWEB/themes/third_party/cartthrob/lib/extload.php:0
[28-Jan-2013 10:46:39 UTC] PHP   2. Cartthrob_ogone_redirect->extload() /Users/Filip/Sites/HEMWEB/themes/third_party/cartthrob/lib/extload.php:242
[28-Jan-2013 10:46:39 UTC] PHP   3. Cartthrob_ogone_redirect->gateway_order_update() /Users/Filip/Sites/HEMWEB/admin/expressionengine/third_party/cartthrob/payment_gateways/Cartthrob_ogone_redirect.php:464
[28-Jan-2013 10:46:39 UTC] PHP   4. Cartthrob_payment_gateway->__call() /Users/Filip/Sites/HEMWEB/admin/expressionengine/third_party/cartthrob/payment_gateways/Cartthrob_ogone_redirect.php:464
[28-Jan-2013 10:46:39 UTC] PHP   5. call_user_func_array() /Users/Filip/Sites/HEMWEB/admin/expressionengine/third_party/cartthrob/payment_gateways/Cartthrob_payment_gateway.php:53
[28-Jan-2013 10:46:39 UTC] PHP   6. Cartthrob_payments->gateway_order_update() /Users/Filip/Sites/HEMWEB/admin/expressionengine/third_party/cartthrob/payment_gateways/Cartthrob_payment_gateway.php:53
[28-Jan-2013 10:46:39 UTC] PHP   7. Cartthrob_payments->set_status_failed() /Users/Filip/Sites/HEMWEB/admin/expressionengine/third_party/cartthrob/libraries/Cartthrob_payments.php:1693
[28-Jan-2013 10:46:39 UTC] PHP   8. Cartthrob_emails->send_email() /Users/Filip/Sites/HEMWEB/admin/expressionengine/third_party/cartthrob/libraries/Cartthrob_payments.php:1247
[28-Jan-2013 10:46:39 UTC] PHP   9. Cartthrob_emails->parse() /Users/Filip/Sites/HEMWEB/admin/expressionengine/third_party/cartthrob/libraries/Cartthrob_emails.php:178
[28-Jan-2013 10:46:39 UTC] PHP  10. Template_helper->parse_template() /Users/Filip/Sites/HEMWEB/admin/expressionengine/third_party/cartthrob/libraries/Cartthrob_emails.php:318
[28-Jan-2013 10:46:39 UTC] PHP  11. EE_Template->parse() /Users/Filip/Sites/HEMWEB/admin/expressionengine/third_party/cartthrob/libraries/Template_helper.php:381
[28-Jan-2013 10:46:39 UTC] PHP  12. EE_Template->tags() /Users/Filip/Sites/HEMWEB/admin/expressionengine/libraries/Template.php:460
[28-Jan-2013 10:46:39 UTC] PHP  13. EE_Template->process_tags() /Users/Filip/Sites/HEMWEB/admin/expressionengine/libraries/Template.php:894
[28-Jan-2013 10:46:39 UTC] PHP  14. Channel->entries() /Users/Filip/Sites/HEMWEB/admin/expressionengine/libraries/Template.php:1305
[28-Jan-2013 10:46:39 UTC] PHP  15. Channel->parse_channel_entries() /Users/Filip/Sites/HEMWEB/admin/expressionengine/modules/channel/mod.channel.php:333
[28-Jan-2013 10:46:39 UTC] PHP  16. Publisher_api_channel_fields->apply() /Users/Filip/Sites/HEMWEB/admin/expressionengine/modules/channel/mod.channel.php:3890
[28-Jan-2013 10:46:39 UTC] PHP  17. call_user_func_array() /Users/Filip/Sites/HEMWEB/admin/expressionengine/third_party/publisher/libraries/Publisher/Publisher_api_channel_fields.php:19
[28-Jan-2013 10:46:39 UTC] PHP  18. Cartthrob_order_items_ft->replace_tag() /Users/Filip/Sites/HEMWEB/admin/expressionengine/third_party/publisher/libraries/Publisher/Publisher_api_channel_fields.php:19
[28-Jan-2013 10:46:39 UTC] PHP  19. Data_filter->sort() /Users/Filip/Sites/HEMWEB/admin/expressionengine/third_party/cartthrob_order_items/ft.cartthrob_order_items.php:142
#4

Filip Vanderstappen

Here is some more follow up information. This only happens in “Development” mode and only when when ‘replace_url’ is called through the Publisher_lib ‘apply’ function.

#5

BoldMinded (Brian)

I think I might have this fixed in the next build. The pre_process check I added before was in the wrong location. I was seeing the Assets error locally prior to the change, and its not happening for me anymore. In the Publisher_lib file change the beginning of the apply method to look like this:

public function apply(Api_channel_fields &$api, EE_Fieldtype &$ft, $method, $parameters = array())
    {
        $is_replace_variant = (substr($method, 0, 7) == 'replace') ? TRUE : FALSE;

        // If in production mode, then channel_entries_query_result will grab the translated
        // entry data for the fields, so we don't need to do individual field lookups here.
        if (PUBLISHER_MODE == 'production' AND ($is_replace_variant OR $method == 'pre_process'))
        {
            return $parameters;
        }
#6

BoldMinded (Brian)

Filip, did this fix work for you?

#7

Filip Vanderstappen

Sorry, forgot to give feedback on this. It worked out fine. Just tested it again on an isolated environment and it did the trick. Didn’t experience any other issues with this fix.

Login to reply