I am using a basic install of Drupal 7 with only the modules installed to get Ubercart up and running. Most Ubercart modules have been enabled, except for all of the payment modules. The only payment modules that have been enabled are credit card and test gateway. I have listed the pages with errors that I found with the debugging messages listed below.
Module List Page
• Notice: Undefined index: full in field_info_max_weight() (line 796 of/home/passion/public_html/modules/field/field.info.inc).
• Notice: Undefined index: full in field_info_max_weight() (line 796 of/home/passion/public_html/modules/field/field.info.inc).
Store Administration Page
• Notice: Undefined index: block_callback in uc_store_admin() (line 37 of/home/passion/public_html/sites/all/modules/ubercart/uc_store/uc_store.admin.inc).
• Notice: Undefined index: block_callback in uc_store_admin() (line 37 of/home/passion/public_html/sites/all/modules/ubercart/uc_store/uc_store.admin.inc).
• Notice: Undefined index: block_callback in uc_store_admin() (line 37 of/home/passion/public_html/sites/all/modules/ubercart/uc_store/uc_store.admin.inc).
• Notice: Undefined index: block_callback in uc_store_admin() (line 37 of/home/passion/public_html/sites/all/modules/ubercart/uc_store/uc_store.admin.inc).
• Notice: Undefined index: block_callback in uc_store_admin() (line 37 of/home/passion/public_html/sites/all/modules/ubercart/uc_store/uc_store.admin.inc).
• Notice: Undefined index: block_callback in uc_store_admin() (line 37 of/home/passion/public_html/sites/all/modules/ubercart/uc_store/uc_store.admin.inc).
• Notice: Undefined index: block_callback in uc_store_admin() (line 37 of/home/passion/public_html/sites/all/modules/ubercart/uc_store/uc_store.admin.inc).
View Customers Page
Notice: Undefined variable: rows in uc_store_customers() (line 166 of/home/passion/public_html/sites/all/modules/ubercart/uc_store/uc_store.admin.inc).
Customer Reports
• Notice: Undefined index: page in uc_reports_customers() (line 46 of/home/passion/public_html/sites/all/modules/ubercart/uc_reports/uc_reports.admin.inc).
• Notice: Undefined index: nopage in uc_reports_customers() (line 47 of/home/passion/public_html/sites/all/modules/ubercart/uc_reports/uc_reports.admin.inc).
• Notice: Undefined variable: rows in uc_reports_customers() (line 96 of/home/passion/public_html/sites/all/modules/ubercart/uc_reports/uc_reports.admin.inc).
• Notice: Undefined variable: csv_output in uc_reports_store_csv() (line 229 of/home/passion/public_html/sites/all/modules/ubercart/uc_reports/uc_reports.module).
• Notice: Undefined index: nopage in uc_reports_customers() (line 136 of/home/passion/public_html/sites/all/modules/ubercart/uc_reports/uc_reports.admin.inc).
Product Reports
• Notice: Undefined index: page in uc_reports_products() (line 163 of/home/passion/public_html/sites/all/modules/ubercart/uc_reports/uc_reports.admin.inc).
• Notice: Undefined index: nopage in uc_reports_products() (line 164 of/home/passion/public_html/sites/all/modules/ubercart/uc_reports/uc_reports.admin.inc).
• Notice: Undefined variable: csv_output in uc_reports_store_csv() (line 229 of/home/passion/public_html/sites/all/modules/ubercart/uc_reports/uc_reports.module).
• Notice: Undefined index: nopage in uc_reports_products() (line 310 of/home/passion/public_html/sites/all/modules/ubercart/uc_reports/uc_reports.admin.inc).
Sales Reports
• Warning: timezone_open(): Unknown or bad timezone (0) in format_date() (line 1862 of/home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
Sales Tax Reports
• Notice: Undefined variable: csv_output in uc_reports_store_csv() (line 229 of/home/passion/public_html/sites/all/modules/ubercart/uc_reports/uc_reports.module).
• Warning: timezone_open(): Unknown or bad timezone (0) in format_date() (line 1862 of/home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
• Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1900of /home/passion/public_html/includes/common.inc).
Stock Reports:
Fatal error: Call to undefined function pager_query() in /home/passion/public_html/sites/all/modules/ubercart/uc_stock/uc_stock.admin.inc on line 87
Thank you for taking the time to review my bug report.
| Comment | File | Size | Author |
|---|---|---|---|
| #28 | 994222-uc_reports-timezones.patch | 35.41 KB | longwave |
| #19 | 994222-customer-rows.patch | 660 bytes | longwave |
| #18 | 994222-store-address-fields.patch | 1.1 KB | longwave |
| #3 | 994222_notices.patch | 7.18 KB | Island Usurper |
| #2 | 994222_notices.patch | 4.13 KB | Island Usurper |
Comments
Comment #1
longwaveSeveral more in the configuration pages:
/admin/store/settings/checkout
Notice: Undefined index: #title in uc_summarize_element() (line 116 of uc_store/includes/summaries.inc).
/admin/store/settings/orders/edit/panes
Notice: Undefined variable: create in theme_uc_order_status_table() (line 835 of uc_order/uc_order.module).
When submitting /admin/store/settings/payment/edit/methods and uc_credit is enabled:
Notice: Undefined index: update_cc_encrypt_dir in uc_credit_settings_form_submit() (line 909 of payment/uc_credit/uc_credit.module).
/admin/store/settings/quotes
/admin/store/settings/quotes/methods
Notice: Undefined index: small_package in uc_quote_method_settings() (line 232 of shipping/uc_quote/uc_quote.admin.inc).
/admin/store/settings/quotes/methods/flatrate
Notice: Undefined index: mid in uc_flatrate_admin_method_edit_form_submit() (line 144 of shipping/uc_flatrate/uc_flatrate.admin.inc).
When saving a flat rate shipping quote, but leaving the price fields blank:
General error: 1366 Incorrect decimal value: '' for column 'base_rate' at row 1: UPDATE {uc_flatrate_methods} SET title=:db_update_placeholder_0, label=:db_update_placeholder_1, base_rate=:db_update_placeholder_2, product_rate=:db_update_placeholder_3 WHERE (mid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => test [:db_update_placeholder_1] => test [:db_update_placeholder_2] => [:db_update_placeholder_3] => [:db_condition_placeholder_0] => 2 ) in drupal_write_record()
/admin/store/settings/taxes/add
Notice: Undefined variable: rate in uc_taxes_form() (line 153 of uc_taxes/uc_taxes.admin.inc).
Notice: Trying to get property of non-object in uc_taxes_form() (line 153 of uc_taxes/uc_taxes.admin.inc).
Comment #2
Island Usurper commentedHmm. Not sure what to do about "full" in the Field API. I've been on the Modules page several times, and I don't know that I've ever seen it.
The timezone problem is going to give me fits, I can tell. Quite a while ago, the reports were changed to make sure they stayed on the same timezone, because people were getting confused between order time, the site timezone, and their account's timezone. Perhaps 0 should just be replaced with an appropriate +0 timezone from the list, but I'd rather fix it so that Drupal does all of that calculating instead of the reports.
The rest of the notices and warning in the OP ought to be handled by this patch. The ones in #1 I'll try to get to tomorrow.
Comment #3
Island Usurper commentedOK, I've gotten most of them now. Once I figured out that Devel was blocking notices again, I started to see these problems. But not all of them. The variable "create" on the order panes page and the index "mid" in uc_flatrate_admin_method_edit_form_submit() were never a problem for me.
I've dumped all of these fixes into one patch since they're all so minor by themselves.
Comment #4
Tom Kraft commentedI'm having similar problems so I tried to run the patch but it failed with the following message:
File to patch: 994222_notices.patch
patching file 994222_notices.patch
Hunk #1 FAILED at 229.
1 out of 1 hunk FAILED -- saving rejects to file 994222_notices.patch.rej
can't find file to patch at input line 50
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|
|=== modified file 'uc_reports/uc_reports.admin.inc'
|--- uc_reports/uc_reports.admin.inc 2010-08-24 19:35:35 +0000
|+++ uc_reports/uc_reports.admin.inc 2010-12-13 22:20:34 +0000
--------------------------
Any ideas why? Thanks for any help, Tom
Comment #5
zoraxHi,
I use you patch (put with my little fingers..) on the drupal 7 RC2
I always this error message in configuration / shipping cost setting :
Notice: Undefined index: order in uc_quote_method_settings() (line 226 of...\uc_quote.admin.inc).
Here is the line 226 :
if (is_array($method_types['order'])) {
$count = count($method_types['order']);
$form['uc_quote_type_weight']['#description'] .= format_plural($count, '
The %list method is compatible with any shipping type.', '
The %list methods are compatible with any shipping type.', array('%list' => implode(', ', $method_types['order'])));
}
Comment #6
mandreato commentedSomething similar here: on a fresh D7 RC2, applied patches from #3 manually, but still get the following when changing address fields of checkout settings:
Notice: Undefined index: enabled in uc_store_address_fields_form_submit() (line 803 of ...\sites\all\modules\ubercart\uc_store\uc_store.module).
Comment #7
NPC commentedIs it related that I get similar warnings when trying to install the module? I am running in XAMPP on Windows, may be that adds some nuances. The module can't be installed because of this.
The warnings I receive are:
Comment #8
threewestwinds commentedThe patch in #3 does fix several errors - the fact that it doesn't fix them all is no reason not to get it in. Avoid "One Patch to Rule Them all" if possible.
Only a single gramatical nitpick:
$rows =array();The attached patch is just a reroll of #3 with the space added. It still applies cleanly to 7.x-3.x-dev. I'm going to break the rules slightly and set my own patch RTBC, since it's not really my patch.
Comment #9
Island Usurper commentedThat sounds good to me. Committed #3 with the space added.
I almost always have uc_flatrate enabled on my test sites because it always works, so I never noticed the problem in uc_quote.admin.inc. I can't get the others to show up for me. If they end up being a problem, I guess we can work on it some more.
Comment #10
scotwith1tstill getting errors with Drupal 7.0, UC 3.x-dev as of today...
on View Customers page:
- Notice: Undefined variable: rows in uc_store_customers() (line 154 of E:\xampp\htdocs\d7\sites\all\modules\ubercart\uc_store\uc_store.admin.inc).
on Order Settings page:
- Notice: Use of undefined constant RULES_UI_PATH - assumed 'RULES_UI_PATH' in uc_order_settings_form() (line 102 of E:\xampp\htdocs\d7\sites\all\modules\ubercart\uc_order\uc_order.admin.inc).
on Sales Reports pages (all 3 tabs):
•Warning: timezone_open() [function.timezone-open]: Unknown or bad timezone (0) in format_date() (line 1867 of E:\xampp\htdocs\d7\includes\common.inc).
•Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in format_date() (line 1905 of E:\xampp\htdocs\d7\includes\common.inc). (this one multiple times on the page
not seeing the reports errors anymore, so i assume this patch just corrected those? still, should these be reported in another issue or be addressed here since they were intially brought up here?
Comment #11
bensti commentedim getting the same error, do you have any idea ? im running a fresh drupal 7.0 ? or install the 6.X version ?
thx you
* Notice: Undefined index: block_callback in uc_store_admin() (line 37 of /home/orizonme/public_html/amandapleasures/sites/all/modules/ubercart/uc_store/uc_store.admin.inc).
* Notice: Undefined index: block_callback in uc_store_admin() (line 37 of /home/orizonme/public_html/amandapleasures/sites/all/modules/ubercart/uc_store/uc_store.admin.inc).
* Notice: Undefined index: block_callback in uc_store_admin() (line 37 of /home/orizonme/public_html/amandapleasures/sites/all/modules/ubercart/uc_store/uc_store.admin.inc).
* Notice: Undefined index: block_callback in uc_store_admin() (line 37 of /home/orizonme/public_html/amandapleasures/sites/all/modules/ubercart/uc_store/uc_store.admin.inc).
* Notice: Undefined index: block_callback in uc_store_admin() (line 37 of /home/orizonme/public_html/amandapleasures/sites/all/modules/ubercart/uc_store/uc_store.admin.inc).
* Notice: Undefined index: block_callback in uc_store_admin() (line 37 of /home/orizonme/public_html/amandapleasures/sites/all/modules/ubercart/uc_store/uc_store.admin.inc).
Comment #12
tr commented@bensti: That issue is already fixed - read the above comments. To use the fix you need to either 1) install the -dev version of Ubercart, or 2) apply the patch in #3.
Comment #13
mandreato commentedSorry for reopening this, but the following error is still present on Drupal 7.0, UC 3.x-dev as of yesterday.
Only added italian language + Bank Transfer | Ubercart Payment module (but the problem persists if I disable it).
Notice: Undefined index: enabled in uc_store_address_fields_form_submit() (line 803 of ...\sites\all\modules\ubercart\uc_store\uc_store.module).
It pops up when I try to set/unset phone number required on /admin/store/settings/checkout/edit/fields
Comment #14
bensti commented@TR thx you
Comment #15
BrandTim commentedSubscribing.
The error I am receiving is:
Notice: Undefined index: full in field_info_max_weight() (line 797 of /path/to/drupal/modules/field/field.info.inc).
Fresh install. Minimum modules installed and enabled to run Ubercart, plus Catalog, Payment, Reports, Shipping, Tax Report, Flatrate, and Paypal plus Secure Pages.
Tim Knittel
Comment #16
tr commented@BrandTim: #12 applies to your post too ...
Comment #17
Island Usurper commentedIt seems like every time I turn around, there's something new keeping me from seeing the notices thrown by my code. Earlier, it was because I had updated Devel, and didn't remember that I had changed its error reporting. Now notices are only going to Watchdog and not the screen, despite all settings saying the opposite.
Time for me to search the issue queue, I guess.
Comment #18
longwavePatch attached that fixes the error from #13. Also fixes the reset button so it resets the state of the "required" checkboxes to their defaults.
Comment #19
longwaveTrivial patch attached that fixes the first error in #10. This only showed up when there were no customers to list.
The Rules implementations look like they should be reworked, so rules can be configured from somewhere even if rules_admin is disabled: see http://drupal.org/node/1015872
Comment #20
gaking44 commentedhow does a person install this patch?
Comment #21
tr commented@gaking44: Please read http://drupal.org/patch and http://drupal.org/node/317
Comment #22
gaking44 commentedMy problem was that I couldn't find the shipping file to replace the code in using ftp, but I found it within my hosting site file structure. Thank you.
Comment #23
gaking44 commentedHas a patch been issued for #1 above (timezone)?
Comment #24
longwaveCommitted #18 and #19. The timezone and rules errors still need fixing, so setting back to active.
Comment #25
tr commentedThe rules error has its own issue: #1030500: Use of undefined constant RULES_UI_PATH - assumed 'RULES_UI_PATH' in uc_order_settings_form() As that was never the part of the original bug report (it was first mentioned in #10) I think it's better to handle it there than to continue addressing new problems here.
Renaming this to reflect the only outstanding issue from the original post.
Comment #26
polistvan commentedCould anyone recommend a solution for the this error:
Undefined index: order uc_quote_method_settings()
Undefined index: order uc_quote_method_settings() (line 226 of...\uc_quote.admin.inc).
The line 226 is:
if (is_array($method_types['order'])) {
Thank you
Comment #27
plusle commentedI do not see any patch for "Sales Reports" errors, I still get these errors anyone have any idea to fix?
Comment #28
longwavePatch attached against 7.x-3.x-dev that fixes the timezone error in this issue, fixes some undefined variable bugs in the reports, and also (hopefully) fixes all the timezone related problems in reporting. I have tested it by switching my user timezone between Europe/London, Pacific/Auckland and Pacific/Samoa, and it seems to work as expected, but could do with some more testing.
If this is successful it should be backported to 6.x if possible, as it should close these related issues:
#740296: Sales & Product Reports - big problem with dates causing incorrect & inaccurate data
#692628: UC Sales Summaries intervals are not reflecting timezone offsets
#635986: gmdate using "M" to "m" for reports
Comment #29
jlporter commentedFresh install of -dev rolled on feb 8(downloaded the 9th), still getting Notice: Undefined index: full in field_info_max_weight()
Comment #30
tr commented@jlporter: This thread has gotten seriously confused because there were at least 10 separate issues reported by the initial poster, with subsequent posters adding additional issues. In #2 Island Usurper said he couldn't reproduce the PHP notice that you're seeing, so I think it would be best to open a new issue just for this problem. Please be sure to include information such as which pages show the notice and what actions are required to reproduce the problem.
Comment #31
longwave"Notice: Undefined index: full in field_info_max_weight()" is apparently a Drupal core issue that will be fixed in 7.1; see #1001624: Avoid "Undefined index" notice in field_info_max_weight() function of modules/field/field.info.inc
Comment #32
tr commented@longwave: Nice find. That also explains why Island Usurper doesn't see it - IIRC he is using Drupal 7 HEAD for his development.
Comment #33
tr commentedTagging.
Comment #34
tr commentedThere's a lot of stuff in that patch. I will review it later today for you.
Comment #35
Island Usurper commented#28 will need a reroll once #740296: Sales & Product Reports - big problem with dates causing incorrect & inaccurate data gets committed and ported to 7.x-3.x. That should happen soon since it's also a release blocker.
Comment #36
longwave#28 was meant to fix that issue directly in D7, taking advantage of the fact D7 now handles user and site timezones in a better way. See http://drupal.org/node/224333#date_default_timezone
Comment #37
longwaveTo expand on the above: in D6 we need to calculate the timezone offset ourselves, and make everything complicated by using gmdate() and adding on the offset. In D7 we can just use date() and friends directly, as the default PHP timezone is automatically set to the user's timezone (if available), or the site-wide timezone otherwise.
Comment #38
Island Usurper commentedOh, OK. I guess that's what I get for paying so much attention to #740296. I didn't pay much attention and thought this patch was just for fixing notices.
Comment #39
Island Usurper commentedThanks, longwave. Committed to 7.x-3.x.
Comment #40
pjcdawkins commentedI have the same minor issue as #15 (BrandTim).
Notice: Undefined index: full in field_info_max_weight() (line 797 of /var/www/uclu-devel/public/modules/field/field.info.inc).Clean install of:
It was also reported separately in #1030486: "Undefined index: full in field_info_max_weight()" when installing but that's marked as a duplicate.
Comment #41
longwave@pjcdawkins: That is a Drupal core bug, upgrade to Drupal 7.x-dev or wait for 7.1 to be released.