I'm troubleshooting the installation of Draggableviews and Views modules. Draggableviews sets up JavaScrip drag handles on a views list. Right now the end user page where these drag handles are shown is producing a page notice (see #1 below) (>_<)
Apparently some sites suppress this notice rather than resolve it. A Google search shows as the top hits not posts about the notice, but other pages with the same error! The UC Berkeley page seems to have simply suppressed the errors.
-----
1) End-user page error, menu [8 instances]
Notice: Undefined index: in template_preprocess_views_view_table() (line 569 of /var/www/live/ pizzeriamondo/sites/all/modules/views/theme/theme.inc).
Some things I've tried recently:
Another Views issue 1309026: "Don't render table header if all field labels are empty", posted a similar notice so I applied patch in comment #25.
Comments
Comment #1
Patricia_W CreditAttribution: Patricia_W commentedYou can turn off error messages in /admin/config/development/logging
Comment #2
CliveCleaves CreditAttribution: CliveCleaves commentedI figured out what was doing this on my instance, might help others.
I was using group sorting (i.e. Grouping field Nr.1 / Nr.2) in my table settings. I had used feeds to import the data, and one of my groups did not have a Nr.2 grouping field. Views didn't know what to do so got stuck there and threw up this error.
Possible Solutions:
1. Stop grouping on the field that has no data
2. Add data to the field that you want to sort by (I did this, fixed my problem)
3. Try unchecking 'Use rendered output to group rows' or try checking 'Show the empty text in the table'
(I tested one and two quite a bit, work perfectly. Not too sure about number three)
Fixing the problem is always better than just turning off error messages. :P
Comment #3
quiethero CreditAttribution: quiethero commentedHey guys, I get these three messages on every page no matter what I do. I am not a database guru yet but I am learning. Can you step-by-step walk me through the database adjustments you made and to which specific tables and fields.
Notice: Undefined offset: 0 in /home/mysite/public_html/includes/errors.inc on line 271
Notice: Undefined index: file in /home/mysite/public_html/includes/errors.inc on line 72
Notice: Undefined index: line in /home/mysite/public_html/includes/errors.inc on line 73
I know its a db problem and it occurred on 4 separate freshly installed Drupal 7.22 sites and CiviCRM 4.33. Without one single file added other than me, the admin, none other, no adjustments no files changed and these errors appear. I am baffled and have even turned off logging as Patricia suggested and they still appear on my admin pages and production mailings.
Comment #4
sk2013 CreditAttribution: sk2013 commentedI have the same issue as #3 and any help in fixing is greatly appreciated.
Thanks,
Comment #5
sk2013 CreditAttribution: sk2013 commentedI appreciate the help in fixing the following error message appearing in production even after turning the error logging and after PHP upgrade to latest version. The error is captured at the server (Apache) logs and not at the Report Logs by Drupal.
Could some one through light on this..
Notice: Undefined offset: 0 in /home/mysite/public_html/includes/errors.inc on line 271
Notice: Undefined index: file in /home/mysite/public_html/includes/errors.inc on line 72
Notice: Undefined index: line in /home/mysite/public_html/includes/errors.inc on line 73
Thanks for the help
Comment #6
erwangel CreditAttribution: erwangel commentedSame here, apache logs say where the errors are (in errors.inc !) but no idea where they come from.
Same lines as sk2013 (#5) . apache's mod_fcgid could be the cause ?
mod_fcgid: stderr: PHP Notice: Undefined offset: 0 in ... line 271 ; Undefined index: file in ... line 72 ; Undefined index: line in ... line 73
Comment #7
Nicolas Bouteille CreditAttribution: Nicolas Bouteille commentedSame problem here, what's weird also is that these messages don't get displayed like normal error messages. They get displayed at the bottom of the page. Maybe because I am using Omega 4 but...
I have additional info for each message
All this is displayed in a sort of table...
I noticed that these messages get displayed everytime I stop working on my site for a moment and then I come back on it. The page takes time to load, I can see the errors if I scroll to the bottom, and if I refresh again it loads fast with no error.
I don't have this problem in production so maybe this is linked to MAMP ? It looks like a memory problem...
Comment #8
Nicolas Bouteille CreditAttribution: Nicolas Bouteille commentedLooks like a lot of websites on Google are having these errors
Comment #9
Nicolas Bouteille CreditAttribution: Nicolas Bouteille commentedI don't think this is a Views problem though. We should probably move this to Core.
Comment #10
Nicolas Bouteille CreditAttribution: Nicolas Bouteille commentedOk I think I found out what that was. I inspected the error table and it had the class xdebug something... indeed I had xdebug enabled on my MAMP. So I disabled it, restarted everything and it seems I don't get the heavy first load nor the errors at the bottom. Actually all page loads seem a bit faster.
I also disabled on my MAMP Pro host the feature to make my dev website available on my LAN (useful for mobile and IE testings).
Comment #11
Nicolas Bouteille CreditAttribution: Nicolas Bouteille commentedAlright I take it back! I just got a long page load with the same errors at the bottom. The design has changed now they're just inside the body not wrapped inside a specific div. So it was not linked to xdebug.
Comment #12
Nicolas Bouteille CreditAttribution: Nicolas Bouteille commentedAnother lead: I had a module and a theme with the exact same machine name. Since I changed that, it looks like the error went away.
Comment #13
Nicolas Bouteille CreditAttribution: Nicolas Bouteille commentedAs soon as I write this, the error is back... nevermind !
Comment #14
berimbolo CreditAttribution: berimbolo commentedThe issue seems to be when a debugging call is made directly from main()
This seems to fix it:
On line 264 replace
while (($backtrace && !isset($backtrace[0]['line'])) ||
with