Hello,

I(ve got this warning after installing the dev. version 24/01:

warning: Attempt to assign property of non-object in /www/sites/all/modules/date/date/date_handler_field_multiple.inc on line 85.

Comments

SaxxIng’s picture

Same to me too!
Saxx

terrychild’s picture

StatusFileSize
new6.82 KB
new11.95 KB

Me to - just upgraded from previous dev version.

I have an 'event' content type with a CCK date field and the warning occurs only for the 'Upcoming Block' display of the attached view.

Regards

Terry Child

bonobo’s picture

I saw this with the dev version -- uninstalling the dev version, and reverting back to rc 6 eliminated the issue.

choster’s picture

I get a completely different set of warnings (db name "library") upon running update.php, which may or may not be related:

user warning: Table 'library.date_format_types' doesn't exist query: SELECT dft.type, dft.title, dft.locked FROM date_format_types dft ORDER BY dft.title in /usr/www/sites/all/modules/date/date_api.module on line 1857.

Never mind, the previous, which seems to have cleared up after the third time I ran update.php . Unfortunately, now I [i]am[/i] seeing the line 85 error.

junro’s picture

Status: Active » Fixed

After dev 26/01

Be careful, you have to run update.php 2 times.

junro’s picture

Status: Fixed » Active

warning: Attempt to assign property of non-object in /www/sites/all/modules/date/date/date_handler_field_multiple.inc on line 85.

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= users_comments.uid WHERE (.status <> 0 OR .uid = 7 or 1 = 1) AND (.type in ('' at line 3 query: SELECT COUNT(*) FROM (SELECT uid FROM users users LEFT JOIN users users_comments ON .uid = users_comments.uid WHERE (.status <> 0 OR .uid = 7 or 1 = 1) AND (.type in ('fiche')) ) count_alias in /www/sites/all/modules/views/includes/view.inc on line 699.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= users_comments.uid WHERE (.status <> 0 OR .uid = 7 or 1 = 1) AND (.type in ('' at line 14 query: SELECT uid, timestamp, subject, cid, nid, field_titre_france_url, field_titre_france_title, field_titre_france_attributes, type, field_annee_value, name, homepage FROM users users LEFT JOIN users users_comments ON .uid = users_comments.uid WHERE (.status <> 0 OR .uid = 7 or 1 = 1) AND (.type in ('fiche')) ORDER BY DESC LIMIT 0, 5 in /www/sites/all/modules/views/includes/view.inc on line 725.

junro’s picture

Title: Warning after installing the dev. version 24/01 » Warning after installing the dev. version 26/01

Got this too:

Parse error: syntax error, unexpected $end in /www/sites/all/modules/date/date_repeat/date_repeat.module on line 203

junro’s picture

Go back to the old version get still some errors, I had to restort a backup.

szy’s picture

Priority: Normal » Critical

This update made a complete disaster in my views, and yes - there was info
about converting views after upgrade.

It changed my node types defined in views, number of displaying items, deleted
relationships... It looks like it copied one of my kind-of-event views to other
non-events views... Ugggh.

Szy.

SaxxIng’s picture

Same to me too!
All custom views are corrupted!
Saxx

junro’s picture

I decide to wait a little before to install a new dev version now lol

The Best thing to do is to wait a new recommended version I think.

karens’s picture

I just removed the code that was trying to update Views from the update in case that is breaking things. I can't replicate the original error, though, so I have to investigate that. Sorry!

karens’s picture

Status: Active » Postponed (maintainer needs more info)

Well all these errors are views-related, so that fix may take are of everything. I'll keep an eye on it, but please report back if you still have problems after picking up the code with this fix.

I tested that change, I really did, so I don't know why it didn't create those problems for me.

cps@groups.drupal.org’s picture

Path and arguments are empty, and I get filter from calendar in different other views (glossary) and somtimes an ajax error.

Ok, the views working, after I edit the settings or restore the view, but I lose all my modifications.

szy’s picture

@Karen, now upgrade went fine, thanks.

We still need you here - could you please look into it...? :] Thank you.

Szy.

jvieille’s picture

With the dev of the 26th, my site was totaly messed up: views references get other ones, menu items linking to views disappearing, Imppossible to fix, having to start from a backup.

Do you think that this is solved now?

szy’s picture

@jvieille, yes, there is no views' converter what was views' destroyer in fact.
I have it tested and worked on it. It's safe, imho.

Szy.

Aquilasfx’s picture

i have the same warning... date_format_types' doesn't exist query: SELECT dft.type, dft.title, dft.locked FROM date_format_types dft ORDER BY dft.title in /Users/lucky/www/drupal-6.9/modules/date/date_api.module on line 1857.

amccoy’s picture

I have installed Date 6.x-2.x-dev (2009-Jan-26) and am also getting the following error on my view:

warning: Attempt to assign property of non-object in /var/www/vhost/baystreetsh/theatre/sites/all/modules/date/date/date_handler_field_multiple.inc on line 85.

I even re-created the content type & view scenario after I ran update.php

I only seem to get this warning on the newly created content types with the Datetime CCK field -- other content types that I had created before I updated the module from 6.x-2.0-rc6 (2008-Dec-02) seem to not display any similar warnings.

Should I revert back to 6.x-2.0-rc6 (2008-Dec-02) -- or is there an imminent fix?

choster’s picture

momper’s picture

warning: Attempt to assign property of non-object in modules/date/date/date_handler_field_multiple.inc on line 85.

same like#19

RicardoJBarrios’s picture

Also same like #19, and commenting // unset($node->view); doent's seems to work.

choster’s picture

The code that caused the error was removed from the current dev. But if you installed the "bad" update, it seems simply updating to the newest dev does not remove the error; I tried that in combination with rebuilding the views, clearing the views cache, and making a null edit. I could only clear the error by deleting all date fields from the view and adding them anew.

thepanz’s picture

I've got the same issue. Latest -dev for Calendar and Date modules.
Warning showed after adding a date-field into a custom view:

warning: Attempt to assign property of non-object in C:\.....\modules\date\date\date_handler_field_multiple.inc on line 85.
szy’s picture

Title: Attempt to assign property of non-object in date_handler_field_multiple.inc on line 85 » Warning after installing the dev. version 26/01
StatusFileSize
new11.23 KB
new10.02 KB

Hi there, maybe it could be a hint to solve this:

when adding sort criteria, date fields are properly described with value and value2:

-> http://drupal.org/files/issues/date_add_sorting.gif

... but when adding field, there is no value descriptions:

-> http://drupal.org/files/issues/date_add_field.gif

It could be a small mistake only here, or maybe a reason of another misleading
somewhere in the code? Just thinking loudly.

I have got rid of this error by... removing all function render($values) from the code
(lines 80-87). Haven't seen any negative consequences for my site.

Szy.

szy’s picture

Title: Warning after installing the dev. version 26/01 » Attempt to assign property of non-object in date_handler_field_multiple.inc on line 85
Issue tags: +views, +date
pletcher’s picture

Title: Warning after installing the dev. version 26/01 » Attempt to assign property of non-object in date_handler_field_multiple.inc on line 85
StatusFileSize
new734 bytes

This patch works for me. I'm not sure if this is correct, as I do not use Date extensively, but thus far I don't see any problems as a result of it.

Index: date/date_handler_field_multiple.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/date/date/date_handler_field_multiple.inc,v
retrieving revision 1.1.2.7
diff -r1.1.2.7 date_handler_field_multiple.inc
84,85c84,90
<     $values->date_info = !empty($this->view->date_info) ? $this->view->date_info : array();
<     $values->date_info->date_handler_fields = date_handler_fields($this->view);
---
>       if (!empty($this->view->date_info)) {
>         $values->date_info = $this->view->date_info;
>         $values->date_info->date_handler_fields = date_handler_fields($this->view);
>       }
>       else {
>         $values->date_info = array();
>       }

Hope this helps, any feedback is welcome.

steveparks’s picture

That patch worked for me on 6.9 and dev version of date module as of today (5th feb)
Thanks

choster’s picture

karens’s picture

Status: Postponed (maintainer needs more info) » Fixed

Fixed it differently -- needed to initialize the empty value as an object, not an array.

szy’s picture

Thanks Karen, works fine.

Szy.

rick hood’s picture

Same here, works for me.

For those who need more instructions:

sites/all/modules/date/date/date_handler_field_multiple.inc on line 84

change this:

$values->date_info = !empty($this->view->date_info) ? $this->view->date_info : array();

to this:

$values->date_info = !empty($this->view->date_info) ? $this->view->date_info : new StdClass();

Status: Fixed » Closed (fixed)
Issue tags: -views, -date

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