When going to admin/store/orders/view I get the following notices

Notice: Undefined index: order_id in views_handler_filter->accept_exposed_input() (line 547 of /home3/drinksto/public_html/sites/all/modules/views/handlers/views_handler_filter.inc).
Notice: Undefined index: order_status in views_handler_filter->accept_exposed_input() (line 547 of /home3/drinksto/public_html/sites/all/modules/views/handlers/views_handler_filter.inc).
Notice: Undefined property: views_plugin_query_default::$fields in views_plugin_query_default->query() (line 1183 of /home3/drinksto/public_html/sites/all/modules/views/plugins/views_plugin_query_default.inc).
Warning: Invalid argument supplied for foreach() in views_plugin_query_default->compile_fields() (line 1101 of /home3/drinksto/public_html/sites/all/modules/views/plugins/views_plugin_query_default.inc).
Notice: Undefined property: views_plugin_query_default::$fields in views_plugin_query_default->query() (line 1183 of /home3/drinksto/public_html/sites/all/modules/views/plugins/views_plugin_query_default.inc).
Warning: Invalid argument supplied for foreach() in views_plugin_query_default->query() (line 1185 of /home3/drinksto/public_html/sites/all/modules/views/plugins/views_plugin_query_default.inc).
Warning: Invalid argument supplied for foreach() in views_plugin_query_default->compile_fields() (line 1101 of /home3/drinksto/public_html/sites/all/modules/views/plugins/views_plugin_query_default.inc).

This used to work fine. I noticed it after installing an SSL certificate, but reverting all of those changes doesn't seem to help. I reverted the order view back to defaults to see if that would help, but it did not. I updated all modules (none related to views or UC were out of date anyway), cleared caches twice, ran cron, but the error persists.

Any thoughts or ideas would be appreciated.

Thanks,
-Josh

CommentFileSizeAuthor
#4 uc_orders-screenshot.png92.25 KBJoshOrndorff
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave’s picture

Seems similar to #1444272: Notice: Undefined property: views_plugin_query_default::$fields in views_plugin_query_default->query() (line 1181 of xxx)

What version of Views are you using? Have you tried the latest -dev release of Views?

Does the same problem occur if you use Bartik or Seven themes?

longwave’s picture

Status: Active » Postponed (maintainer needs more info)
JoshOrndorff’s picture

Status: Postponed (maintainer needs more info) » Active

Behavior is the same in both Bartik and Seven themes. I updated to the latest -dev of views, and the behavior is the same. Thanks for your help so far; I'm happy to provide any other information I can.
Thanks a lot,
-Josh

JoshOrndorff’s picture

FileSize
92.25 KB

Here is some more information that might be helpful:

  1. I get nearly the same errors on all three uc_orders views
  2. When I try to look at one of the views, I not only get the notices, but the view does not show anything except a pager
  3. I tried to edit the view, and see several missing/broken handlers and and SQL error on the edit page (see attached screenshot)
  4. I tried to import the view from my test site (where it works fine) and got the following messages:

    Field handler uc_orders.actions is not available.
    Field handler uc_orders.order_id is not available.
    Field handler uc_orders.billing_full_name is not available.
    Field handler uc_orders.order_total is not available.
    Field handler uc_orders.created is not available.
    Field handler uc_orders.order_status is not available.
    Filter criterion handler uc_orders.order_id is not available.
    Filter criterion handler uc_orders.order_status is not available.
    Field handler uc_orders.actions is not available.
    Field handler uc_orders.order_id is not available.
    Field handler uc_orders.billing_full_name is not available.
    Field handler uc_orders.order_total is not available.
    Field handler uc_orders.created is not available.
    Field handler uc_orders.order_status is not available.
    Filter criterion handler uc_orders.order_id is not available.
    Filter criterion handler uc_orders.order_status is not available.
    Field handler uc_orders.actions is not available.
    Field handler uc_orders.order_id is not available.
    Field handler uc_orders.billing_full_name is not available.
    Field handler uc_orders.order_total is not available.
    Field handler uc_orders.created is not available.
    Field handler uc_orders.order_status is not available.
    Filter criterion handler uc_orders.billing_first_name is not available.
    Filter criterion handler uc_orders.billing_last_name is not available.
    Filter criterion handler uc_orders.billing_company is not available.
    Filter criterion handler uc_orders.delivery_first_name is not available.
    Filter criterion handler uc_orders.delivery_last_name is not available.
    Filter criterion handler uc_orders.delivery_company is not available.
    Filter criterion handler uc_orders.order_status is not available.
    Unable to import view.

I would really appreciate any help you can provide. Thanks a lot,
-Josh Orndorff

TR’s picture

It's going to be tough to help you because this is a problem specific to your site. Apparently something is corrupted on your site. First thing I'd check is to make sure you have all the Ubercart code in place - look in uc_order/views to make sure all the views hander code is still there. You should have 16 files in there. Then make sure the uc_order/views directory has the proper permissions so that it's readable. Flush your Views cache. Rebuild your Drupal object registry. If necessary, re-download the entire Ubercart distribution again - that won't cause any problems unless you've customized core Ubercart for your site (which is very bad practice). Make sure you've run update.php and you don't have any outstanding updates. Check your .htaccess files to make sure they haven't been changed - perhaps your certificate install process changed some things on your site that you're not aware of.

JoshOrndorff’s picture

TR and longwave,

Thanks a lot for your help so far. I know this is a tricky issue, but I really appreciate the help. Here are the results of my latest testing.

I removed the entire sites/all/modules/ubercart directory and downloaded a fresh copy from drupal.org I still got the same results.

I'm only having this problem on my live site, but my test site works fine, and as far as I can tell they are the same. I dropped every table from my test site's database and replaced them with a copy of the database from my live site, and everything still worked fine on my test site. I then deleted every single file from my public_html directory on my live site and replaced it with a copy of my code from my test site. The live site still threw the errors. I can only assume that it must be aserver configuration error, and I've opened a ticket with my host, but if you have any ideas as to what might be causing the difference, or what settings to look at, I'd love the feedback. Thanks so much.

-Josh Orndorff

longwave’s picture

As it only happens on one server, I am not really sure what it could be; maybe something to do with PHP include paths, or somehow the Drupal 7 registry is not finding class files correctly. Perhaps even a memory limit issue?

Does this happen with any other views? Or is it only ones that contain uc_orders fields?

JoshOrndorff’s picture

Status: Active » Closed (cannot reproduce)

The only views affected were the ones containing uc_orders fields.

I say "were" because something weird happened last night, and now the issue is fixed. I'll document the step here on the off chance that this issue ever comes up for anyone else.

I had opened a support ticket with my web hosting company, but I didn't want to give them access to the full orders view as it contains customer information. So I did the following:

  1. Went to the views admin page
  2. cloned the uc_orders view calling the clone "Public Orders" (machine name: public_orders)
  3. from the clone, removed the first the first three broken/missing handler (should have been actions, order id, Full name)
  4. Deleted the "search" and "by customer" displays from the clone
  5. changed the path of the admin page to /test-page
  6. changed access restriction to none
  7. Saved and viewd the clone
  8. At this point I was expecting the same notices from before but was surprized to find that the view worked fine.
  9. Went back to the original view (not the clone) and found everything to be working fine
  10. Deleted the clone, and the original still works fine
  11. I don't know exactly what part of that process go things working again, and I wish I could go back and try variation of the process to try to figure it out, but now that things are working again, I can no longer reproduce the original issue.

    Thanks again for all your help, and sorry for such a hard-to-diagnose issue.

    -Josh

worstenbrood’s picture

I had exactly the same problem. Turning on and off the ubercart module fixed it for me

worstenbrood’s picture

I had exactly the same problem. Turning on and off the ubercart module fixed it for me