The following error appears on the front page when I use a view with 2 date filters on it.
Fatal error: Cannot create references to/from string offsets nor overloaded objects in /***/includes/common.inc on line 6308
Views 7.x-3.x-dev
Date 7.x-2.x-dev
Similar issues:
#1134856: Fatal error: Cannot create references to/from string offsets... in class.cc.php on line 1575
#1285128: PHP Fatal error: Cannot create references to/from string offsets nor overloaded objects
#1227200: Fatal error: Cannot create references to/from string offsets nor overloaded objects
#1485574: White error screen on use of exposed filter and remember
#789762: Fatal error: Cannot create references to/from string offsets nor overloaded objects in class.cc.php line 1459
#913528: Create new boolean field "Cannot create references to/from string offsets nor overloaded objects"
#41748: Cannot create references to/from string offsets nor overloaded objects
#53230: Cannot create references to/from string offsets nor overloaded objects
[#54135]
Comment | File | Size | Author |
---|---|---|---|
#17 | date_test_view.txt | 7.32 KB | klopsen |
#15 | exported-view.txt | 107.3 KB | OldAccount |
#12 | event-7.x-1.0.zip | 2.79 KB | klopsen |
Comments
Comment #1
Refineo CreditAttribution: Refineo commentedReassigned to Date module as this seems to be specific to this contrib module.
Comment #2
KarenS CreditAttribution: KarenS commentedNot enough information to do anything with this. There are literally hundreds of permutations of ways you could have set up a date field and constructed the view.
Make sure you have run update.php. Edit the view and make sure all the settings still look right, and re-save it. Clear the caches.
Then if you still have a problem you need to describe how the date field is configured and how you set up the view.
Comment #3
Refineo CreditAttribution: Refineo commentedI close this as I cannot reproduce this error after drush cc all and resaving the view.
Background information
- The site frontpage has been replaced with a view (frontpage_2)
- The site configuration redirects all call to http://www.example.com to (frontpage_2)
- The only error message appears when calling http://www.example.com directly
or http://www.example.com/frontpage_2
- This error occurs when user is already logged in as administrator and redirects to the frontpage
http://www.example.com
- The error doesn't occur for anonymous users.
- The error doesn't occur when in the view preview mode.
- The error doesn't occur when view has no date related exposed filter.
- The error doesn't occur after clearing cache and resaving the view again.
- No messages in admin/reports/dblog specific to this error appeared.
Comment #4
MegaphoneJon CreditAttribution: MegaphoneJon commentedI experienced the same problem, doing drush cc all and re-saving the view fixed it for me as well.
However, I also previously had an almost identical error:
Fatal error: Cannot create references to/from string offsets nor overloaded objects in /var/www/dev/ppnyc/includes/common.inc on line 6288
This was on Drupal 7.9 (or maybe 7.8), so it might or might not be the same code. In that case, I didn't have two date filters on my view, but rather one date filter with a "between". Replacing the "between" with two date filters fixed the issue for me (until now, but hopefully that was a fluke).
Also of note - I would get this error when loading the view, but if I edited the view, I wouldn't get this error - and if I viewed the view FROM edit mode, I also wouldn't get this error. I don't think that's terribly helpful for closing the bug, but possibly useful for others who need a workaround.
Comment #5
anavrin CreditAttribution: anavrin commentedI had exactely the same problem:
Fatal error: Cannot create references to/from string offsets nor overloaded objects in includes/common.inc on line 6308
I have a view with exposed filter with date field from - to (date range).
Same thing helped: "drush cc all" and saving a view again.
Comment #6
OldAccount CreditAttribution: OldAccount commentedI have a page displaying 2 blocks that both have a "between" date exposed filter. Doing a "drush cc all" and re-saving the view seems to clear up the issue, however I have to start a new user session for it to work, otherwise it keeps giving the error.
Comment #7
OldAccount CreditAttribution: OldAccount commentedNevermind, the error is back again. This time on a view that only has 1 date "between" exposed filter. "Drush cc all", re-saving the view, and restarting the user session didn't help.
Comment #8
Refineo CreditAttribution: Refineo commented@PalanteJon, @anavrin, @Irobeson, I suggest we reopen this issue but we need more information as @KarenS asks in #2.
Comment #9
KarenS CreditAttribution: KarenS commentedNothing will happen with this unless someone provides steps to reproduce.
Comment #10
Refineo CreditAttribution: Refineo commentedThe issue disappears when cloning a view and saving with a new url-path.
This and some open issues I found concerning PHP itself suggest the issue is with PHP and caching.
I use APC and Boost caching.
I will try to verify this later on.
Comment #11
KarenS CreditAttribution: KarenS commentedPlease don't re-mark this as active until you have given me enough information to reproduce the problem. You have not yet told me anything that would allow me to reproduce the issue.
Comment #12
klopsen CreditAttribution: klopsen commentedI've got the same error. I used simple content type with date field, page view with exposed date filter and attachment.
The error doesn't appear at once, but after resfreshing/adding node/picking up a date. Sometimes to make it happen I had to do those actions couple of times, but error comes again in time.
@KarenS I include features file with content type and view I had used. Hope this will help you (or others) to come up and fix the problem. Just ask if you need more information.
Drupal 7.10
Views 7.x-3.0
Date 7.x-2.0-rc1
Comment #13
KarenS CreditAttribution: KarenS commentedBugs should be tested against the latest version of Date. RC1 is not the latest version. If this can't be reproduced using the latest -dev version of Date there isn't anything to fix. Please confirm that the bug still exists in that version, then tell me how to reproduce it in that version. Thanks!
Comment #14
klopsen CreditAttribution: klopsen commentedI confirm that the bug still occurs in the latest module version (I used latest Views 7.x-3.x-dev and Date 7.x-2.x-dev). I enabled exported feature, added three nodes and the error appeared on views page.
Comment #15
OldAccount CreditAttribution: OldAccount commentedThe bug still occurs for me using Date 7.x-2.x-dev, Views 7.x-3.0-rc3, and Drupal 7.12. I have 2 blocks, both with Data Export options and exposed date range filters. The date ranges default to Jan 1, 2012 - Dec 31, 2012. If I leave the range as is and download the CSV, it works fine. If I change the date range and click Apply, I get the error. Even if I don't change the date range, clicking Apply and then clicking the CSV download link still causes the error.
The same exact thing happens on my production site that's using Date 7.x-2.0-alpha5, Views 7.x-3.0rc3, and Drupal 7.10.
I'm attaching my exported View in case that helps.
Comment #16
KarenS CreditAttribution: KarenS commentedI can't do anything with this unless someone tells me how I would reproduce it on a fresh install with only Date and Views installed. If you can't reproduce it with only Date and Views there is some interaction with other modules.
I can't do anything with that exported view, and I don't know what "both with Data Export options" means. The view above has a ton of non-standard fields in it so I can't use it, and I assume "Date Export optons" means there is some other module being used here.
Comment #17
klopsen CreditAttribution: klopsen commented@Karen: I attached feature with view and content type I used here. If you don't want to use feature module I attach the same view now. 'Event' content type contains only one extra field 'field_event_date'. Error occurs even with only views and date modules intalled.
To reproduce error (in my case) just add new node and go to view page ('/date-test').
Comment #18
klopsen CreditAttribution: klopsen commentedComment #19
OldAccount CreditAttribution: OldAccount commentedMy apologies, I thought the exported file would help.
After a day of trial and error, I believe my issue is with Views Data Export, not Date. In my case, I was only getting the error in IE and I'm 99% sure it involves the Overlay module. Once I disabled Overlay, I stopped getting the error, maybe that will help someone else.
Comment #20
klopsen CreditAttribution: klopsen commentedIn my case, error appears even with overlay module disabled. I diseable it before I enable Views or Date module. Error appears in all browsers...
Comment #21
KarenS CreditAttribution: KarenS commentedSo is this only when using the Views Data Export module? I need to know that because I can't replicate the problem.
Comment #22
klopsen CreditAttribution: klopsen commentedDefinitely not. I use only Views and Date module and error appears. As I wrote before - just try to add some nodes, use exposed date field and it should appear.
Comment #23
KarenS CreditAttribution: KarenS commented@klopsen, You have created a view that aggregates a repeating date field based on an exposed filter that defaults to being blank. So you are trying to aggregate the date value on a view that may contain lots of nodes that don't even contain that date field. I couldn't get the error message above with that view, but I got others. If I give the filter a default value it works for me initially, but you would still have trouble if someone tried to set it back to a blank value. And this is a real edge case too -- an exposed filter on a repeating field that is being aggregated.
The original report says nothing about using a view with aggregation, so I'm not sure your issue is even the same as the original one. And with your example I can't get the error in the original report.
For that matter, pretty much everything in this thread is a different issue -- the original says it is a view with two filters, nothing about them being exposed, then we have a comment about an exposed filter, nothing about aggregation, then we have a comment about an error when using the Views Data Export, no mention of exposed filters or multiple date filters, then yours which is an exposed filter that has aggregation on it.
I think this issue is covering too many totally different topics to be something I can address so I'm marking it "can't reproduce". If there are reproduceable errors in the current code I need separate issues for each one, with explicit steps to reproduce and titles the differentiate which situation we're talking about.
Comment #24
MegaphoneJon CreditAttribution: MegaphoneJon commentedIt's not my intent to reopen this bug, since I don't have a clean enough environment that I could easily reproduce the bug. However, KarenS's last post made me realize that I'm also using aggregation, and perhaps that's an overlooked commonality between folks who see this bug?
My date field is not a repeating field, but I am aggregating, and I'm doing so on an exposed date filter that defaults to blank. I'm reasonably certain that if I don't touch the exposed date filter, I don't trigger this bug.
As a note, I thought that doing drush cc all and resaving with a different path fixed this for me, but I now see I was mistaken. Hope this helps someone.
Comment #25
MegaphoneJon CreditAttribution: MegaphoneJon commentedSince it doesn't seem to have been mentioned earlier - after triggering this bug, the view becomes unloadable until you do one of the two following things:
* You log out and log in again.
* You go to the Edit page for that view, then view the page via the link provided on the Edit page.
Comment #26
MegaphoneJon CreditAttribution: MegaphoneJon commentedCrap, I apologize again. I'm going to keep my mouth shut until I can document my environment more thoroughly. I want to confirm that this issue occurs even when aggregation is NOT enabled.
Comment #27
MegaphoneJon CreditAttribution: MegaphoneJon commentedOK, I know I said I'd keep my mouth shut - but I TENTATIVELY believe I worked around this bug by clearing the "Remember last selection" checkbox on my exposed date filters. I encourage other folks to try that and report back if it fixes their issue!
Comment #28
klopsen CreditAttribution: klopsen commentedGreat job! It worked for me! Turning off the "Remember last selection" done everything. However it only prevents occuring bug but not solves the problem.
Comment #29
KarenS CreditAttribution: KarenS commented@PalanteJon, if you have a reproducable error, please open a new issue and copy the explanation of how to reproduce it there. This one is polluted with too many different issues to be usable, which is why I closed it.
Comment #30
vthirteen CreditAttribution: vthirteen commentedi won't open the issue again, but confirming that the error still happens when Views Export Data is disabled and the "remember field option" is checked out in all exposed fields. editing and saving the view solves the problem only temporarily. whenever i'll make more tests I'll post my findings.
Comment #31
Christian DeLoach CreditAttribution: Christian DeLoach commentedHere is how I was able to replicate the bug, and my workaround for get things working.
To get things back up and running again, I deleted my Drupal session cookie. This will get the program working form me again until I filter the page View using the exposed date field. In order to fix the exposed filter and eliminate the bug, I was forced to disable (uncheck) the "Remember the last selection" option.
Please note, I am running version 7.x-2.5 of the Date module and version 7.x-3.3 of the Views but I have many other modules installed and have not tested the steps above on a freshly installed site using the latest development releases of Views and Date.
Comment #32
VivienLetang CreditAttribution: VivienLetang commentedI confirm that AHOY workaround triggered this error in my environnement too.
To suggest a way to clean this bug, please visit this issue : http://drupal.org/node/1566770. In this issue we see that views don't like the way Date module set arguments and IMHO, we got the same error here.
The Drupal Core function "drupal_array_set_nested_value" try to read the form array. When we come into the different date parts (year, month etc) in a select combobox formatter, the function crashs, because it try to find an array but get a string value (wants "year" = 2012, "month" = 06 etc but have "2012-06...").
Actually, it's impossible to get "remember tools" and "exposed date" both activated.
Hope this help.
Comment #33
kevinquillen CreditAttribution: kevinquillen commentedI just saw this but not with Date module.
If you have filters on a view and they are exposed, and set to 'remember last selection'- then your SESSION has filters stored in in. If you alter the view and change a filter type (like greater than to is between) then Views will try to apply your last value to the filter and cause problems.
I got around this while debugging by putting unset($_SESSION['views']) in a form alter which cleared up the issue.
Comment #34
KarenS CreditAttribution: KarenS commented'needs work' means there is a patch. There is no patch. Changing name to be more descriptive.
Comment #35
hobokenskiclub CreditAttribution: hobokenskiclub commentedI have this issue too, thanks for the suggested workaround. I unchecked the "remember last selection" configuration option for the two date filters in my exposed form until this bug is fixed.
Comment #36
kevinquillen CreditAttribution: kevinquillen commentedNow I am getting this on a view with a date filter, and 'remember' is not checked for anything.
It is definitely date related, because it is the only View filter that is throwing this error. If the filter is not used in the search, it works fine.
Comment #37
kevinquillen CreditAttribution: kevinquillen commentedI tried the patch in #32 and updated Views to 3.x dev and still get the error.
Comment #38
kevinquillen CreditAttribution: kevinquillen commentedHere is a stack trace:
What about the date field is breaking?
I must have used this form a hundred times during development which is now suddenly not working. Some change in between 2.3 and 2.5 has broken this or introduced something in the date filtering that triggers an existing bug.
I was pretty sure that up to now, the View filter was a basic text field for the date, but now it seems to be using a date_select instead. I am modifying the view filter so it is a select drop down of Weekends, not a text input or what is now a year month day input. I need it to be smarter than that.
How do you get around this?
Comment #39
kevinquillen CreditAttribution: kevinquillen commentedI wound up throwing a 'helper' field in to store a unix timestamp in a Integer field instead of a Date field to bypass this filter issue. Worked.
Comment #40
-Mania- CreditAttribution: -Mania- commentedFrom what I can gather I get the error whenever I use the "remember" option in an exposed date field. Like mentioned by other users the default display is fine, the first search is fine, but then returning to the view results in an error. The only way to get rid of the error and white screen is to clear the session e.g. log out the user. I have various other fields using "remember" and they work fine.
Comment #41
-Mania- CreditAttribution: -Mania- commentedAny solutions to this issue?
Comment #42
micbar CreditAttribution: micbar commentedIs there any way to get the "remember" option working on a exposed date filter? Change the date format?
Comment #43
Jaapx CreditAttribution: Jaapx commentedseems to be duplicate of http://drupal.org/node/1485574#comment-7137908. I decribe there a workaround that worked for me and maybe also for you.
Comment #44
micbar CreditAttribution: micbar commentedthanks!
I will try this workaround.
Comment #44.0
micbar CreditAttribution: micbar commentedadded related issues
Comment #45
JKingsnorth CreditAttribution: JKingsnorth commentedComment #46
jgullstr CreditAttribution: jgullstr commentedCheck #1485574: White error screen on use of exposed filter and remember for possible solution.
Comment #47
DamienMcKennaRelated: #2315365: Pager should be built with view::get_exposed_input(), not $view->exposed_raw_input.
Comment #48
Lostboy22 CreditAttribution: Lostboy22 commentedquick fix: log out and restart browser.
Problem: There is a session cookie that is not getting set/cleared.