I'm getting the following ajax error when exporting the data through the "Excel template file for updating data already present on your site. Please ensure all data from your site is present in your downloaded file." functionality:

An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /batch?id=26601&op=do StatusText: OK ResponseText: Fatal error: Call to a member function execute() on a non-object in <path-to-site>/sites/all/modules/contrib/feeds_xls/feeds_xls.template.inc on line 143

The error comes straight away after the batch process has begun.

I'm using:

Feeds (dev nov 1st)
Feeds_xls (dev jul 24th)
Commerce_feeds (latest dev)

Import works like a charm (using the downloadable template)

Comments

AdamGerthel created an issue.

jomarocas’s picture

i have same error,, but 7.1.2 version, any idea?

fox mulder’s picture

same issue here, version: 7.x-1.2+18-dev

plus: /import/IMPORTER/xlstemplate gives errors (white page):
Notice: Undefined variable: cell in feeds_xls_set_headers() (line 741 of .../sites/all/modules/contrib/feeds_xls/feeds_xls.template.inc).
PHPExcel_Exception: Cell coordinate can not be zero-length string in PHPExcel_Cell::coordinateFromString() (line 591 of .../sites/all/libraries/PHPExcel/Classes/PHPExcel/Cell.php).

[UPDATE] This happens if no maapping field was added to the importer.

Barry_Fisher’s picture

Hi all,

This may or may not be related to your issue, however this issue came up in my search when trying to use feeds_xls and feeds_entity_processor together. In essence, I think the commonality is that feeds_xls doesn't handle custom entities.

This module should work well for users, nodes and taxonomies entities as-is, however if you're importing to a custom entity, such as commerce products or using the data or eck modules, then you may run into trouble.

There are two related patches for this which I've been able to provide a fix for my use case.

(For the following, I'll assume the reader will be familiar with Drupal module development and implementing Drupal hooks.)

The first is to be able to hook into and override the way feeds_xls gathers existing data to produce the downloadable xls file. The feeds_xls module first needs to usefully implement a hook_alter in the function which generated the existing content. That issue is: Provide ability for third party modules (with custom entities) to define query to generate the xls template with populated data. Hopefully from the patch you'll see sample in the feeds_xls.api.php, which point you in the right direction.

The second part of the fix for me was to write a patch for the Feeds entity processor module as this is where my data end up. The issue for this (i.e. implementing the aforementioned hook) is: Add compatibility with the feeds_xls module

With those two patches applied to the dev versions of both modules, I can now download the xls file where I was previously seeing the AJAX error similar to what you've reported above.

A fix in your case(s) will require you at least apply the first patch mentioned above, and then implement a hook a custom module you create or submit a feature request to the project which provides the entity. I suspect if you raise a feature request for the entity providing module, you could be in for a long wait to commit into a release or even rejection by the maintainers as they may not agree with implementing the hook. I'll leave that to you. In that case, all is not lost! Implementing the hook in a custom module you create for your project would certainly work - it doesn't have to be defined where the entity is defined - if that makes sense?

I hope that helps!