I get the :
Notice: Undefined index: format in views_object->unpack_options() (line 143 of /sites/all/modules/views/includes/base.inc)
And Yes I also did an

  • update to views 7.x-3.x-dev
  • ... and after reading some issues I did an

  • upgrade of Chaos tools to version Chaos tools 7.x-1.x-dev .
  • upgrade of Commerce 7.x-1.x-dev .

After several "drush cc " I still get it.

Comments

damien tournoud’s picture

Status: Active » Closed (duplicate)

See #1034532: Views Export doesn't export Global: Text area filter format. You will have (/ Drupal Commerce will have) to reexport all the views while touching the Global: Text area handlers.

damien tournoud’s picture

Project: Views (for Drupal 7) » Commerce Core
Version: 7.x-3.x-dev » 7.x-1.x-dev
Component: Code » Views integration
Status: Closed (duplicate) » Active

Actually, let's move this to Drupal Commerce.

damien tournoud’s picture

Status: Active » Needs review
StatusFileSize
new4.38 KB

We need something like this.

damien tournoud’s picture

Title: Notice: Undefined index: format in views_object->unpack_options() (line 143 of /sites/all/modules/views/includes/base.inc) » Add missing filters in Drupal Commere Views
rfay’s picture

Title: Add missing filters in Drupal Commere Views » Add missing filters in Drupal Commerce Views

I've seen that too.

bojanz’s picture

StatusFileSize
new4.38 KB

Fixed a few copy-paste errors.

BenK’s picture

Hey everyone,

If I'm reading this code correctly, it looks like this patch is adding a filter for SKU? Is that correct?

I think it would also be handy to have a filter available for the product title (which isn't currently available). The product title would be useful for exposed filters, for instance, that need to be more customer facing.

Also, in the current -dev I do see a filter for "Commerce Order: Created date" available, but it's not working at all for me. (If you guys prefer, I could create a separate issue for the order date filter.)

Thanks,
Ben

bojanz’s picture

It is just specifying the text formats. No actual new filters added. Please open a new issue for your comment :)

cartagena’s picture

I see you've moved this to commerce but I am getting the same message: Undefined index: format in views_object->unpack_options() (line 143 of /sites/all/modules/views/includes/base.inc) and I don't have commerce installed. I am using organic groups and get the message when I display a panel of content specific to a group. I updated to the latest dev versions of OG (May 24) and Views (May 23) and also Ctools and have cleared the cache numerous times and still get the message. I will also post on as a views issue as it wider than commerce. Thank you.

damien tournoud’s picture

@cartagena: please see #1034532: Views Export doesn't export Global: Text area filter format for the Views issue. This is fixed as far as Views is concerned, but the modules exporting Views will have to add the missing filters. Please open an issue in the queue of your favorite module.

damien tournoud’s picture

Status: Needs review » Reviewed & tested by the community

This is RTBC as far as I am concerned for Commerce.

latulipeblanche’s picture

Status: Reviewed & tested by the community » Needs review

Still got the : " Notice: Undefined index: format in views_object->unpack_options() (line 143 of /var/www/MySite/sites/all/modules/views/includes/base.inc). "

It's the first time 4me that I applied a patch, so I prefer to explain what I did (maybe I did it wrong :)

I Copied the patch-code I got from the link above into a patch-file "1166450-add-missing-filters.patch"
This file I put in /var/www/MySite/sites/all/modules/commerce/
In the terminal:

latulipe@latulipe:/var/www/MySite/sites/all/modules/commerce$ git apply -v 1166450-add-missing-filters_0.patch
Checking patch modules/customer/includes/views/commerce_customer_ui.views_default.inc...
Checking patch modules/line_item/includes/views/commerce_line_item.views_default.inc...
Checking patch modules/order/includes/views/commerce_order_ui.views_default.inc...
Checking patch modules/product/includes/views/commerce_product_ui.views_default.inc...
Applied patch modules/customer/includes/views/commerce_customer_ui.views_default.inc cleanly.
Applied patch modules/line_item/includes/views/commerce_line_item.views_default.inc cleanly.
Applied patch modules/order/includes/views/commerce_order_ui.views_default.inc cleanly.
Applied patch modules/product/includes/views/commerce_product_ui.views_default.inc cleanly.

The result lookes ok. I looked in the .inc files and they changed.
To remove the patch-file :

latulipe@latulipe:/var/www/pbcosmetics/sites/all/modules/commerce$ rm 1166450-add-missing-filters_0.patch

Cleaned cache more than two times, but I stil get the message. :(

cartagena’s picture

This patch: 1167562-unpack_options-notice-format.patch (#4 on this thread: http://drupal.org/node/1167562) eliminated the error for me. I got the exact same error as above but the conflict was with og, not commerce. Might help...

BenK’s picture

I can confirm that the patch at http://drupal.org/node/1167562#comment-4511372 (from the Views issue queue) gets rid of the notice (Undefined index: format in views_object->unpack_options) for me. :-)

--Ben

latulipeblanche’s picture

Status: Reviewed & tested by the community » Needs review

Me too, I confirm that #4-patch of http://drupal.org/node/1167562#comment-4511372 solved the problem for me.
And I can also confirm that the way I did the patch (#12) was the right way, maybe there are better ways :)

Tnx

Paul

Update:
So I still had the error after #6 patch (http://drupal.org/node/1166450#comment-4509174).
I did #4-patch of http://drupal.org/node/1167562#comment-4511372,

With the two patches I didn't have any error-messages

damien tournoud’s picture

Status: Needs review » Reviewed & tested by the community

Please re-read and understand #1166450-10: Add missing filters in Drupal Commerce Views and #1167562-9: Undefined index: format in views_object->unpack_options() (line 143 of /sites/all/modules/views. Those exported views are missing critical data, and need to be reexported in all the affected modules. Please open an issue in the modules whose views show the problem.

#6 is RTBC for Drupal Commerce.

BenK’s picture

Damien,

So should the patch in #6 remove this notice (as it pertains to Drupal Commerce)? I'm using the Commerce Kickstart distribution and after applying the patch in #6 I've still got the notice. I don't think I have any other views enabled (besides what is default in Commerce Kickstart), so I'm not sure what else could be the culprit.

Sorry if I'm not fully understanding here... I'm just not clear on what the patch in #6 is intended to fix.

Thanks,
Ben

damien tournoud’s picture

BenK: yes, the patch in #6 is supposed to remove the notice on all the Drupal Commerce Views, supposing that:

(1) you cleared the cache
(2) you have not modified (overridden) the Views

On the Views you have overridden, just go in edit mode and just open and resubmit any handler in "No result behavior", "Header" and "Footer", and save the view.

latulipeblanche’s picture

Status: Needs review » Reviewed & tested by the community

What I did:
So I still had the error after #6 patch (http://drupal.org/node/1166450#comment-4509174).
I did #4-patch of http://drupal.org/node/1167562#comment-4511372,

With the two patches I didn't have any error-messages.

I didn'n try the Damiens way (#19).

rszrama’s picture

Status: Reviewed & tested by the community » Fixed

Alrighty, I've committed this as is. We'll let Earl decide if any further action needs to be taken upstream, but I don't see any reason for us to do something only for Commerce Views that may or may not need to be done for every View.

Status: Fixed » Closed (fixed)

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