Needs work
Project:
Make Meeting Scheduler
Version:
7.x-2.1
Component:
Poll frontend
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2016 at 12:53 UTC
Updated:
15 Nov 2016 at 12:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
SebCorbin commentedHave you tried to flush your caches ?
I've split up the code into more files and those need to be detected by Drupal
Comment #3
indigoxela commentedYes, I've been flushing cache several times.
What I found out so far: $key is false for answers added in the previous version.
Comment #4
indigoxela commentedSome more details:
Drupal 7.50
no other contrib module enabled
Steps to reproduce:
Install makemeeting-7.x-2.0 (previous version) create content type, add field, create some nodes, add several answers.
Update to makemeeting-7.x-2.1, flush cache as usual.
Visit the formerly created polls.
"No answer" everywhere.
Edit such a broken answer.
difference in $answer:
old:
array(2) { ["1477094400:sugg:0"]=> int(1) ["1477180800:sugg:0"]=> int(1) }
new:
array(2) { ["1477087200:sugg:0"]=> int(1) ["1477173600:sugg:0"]=> int(1) }
Hey, did you change something in date/timezone handling?
Comment #5
indigoxela commentedActually you did change something with timezone:
http://cgit.drupalcode.org/makemeeting/commit/?id=d7c7fd8441a69c1624952f...
This patch brings back preivous behaviour.
But I'm not sure.
In case it is important *not* to use date_default_timezone_set('UTC') in function _makemeeting_date_timestamp() anymore, updating could be a bit more complex.
Comment #6
SebCorbin commentedI've worked on timezone handling, normally fixing this.
This is what I did:
Please test it with a backup as you may lose/corrupt data
Comment #7
indigoxela commentedSome more testing here with updates. What I did:
Fresh Drupal install (7.51).
Installed makemeeting 7.x-2.0
Added node type, added field, created nodes, added several answers.
Updated to 7.x-2.1
drush cc all
As expected: formerly added answers are broken. But I didn't edit any of these.
Added some more nodes, added several answers.
Updated to 7.x-2.x (git clone)
drush updb, drush cc all
Cool, all answers added in 7.x-2.0 are back! Timezone was set correctly.
Weird: not all answers added in 7.x-2.1 are there.
Every last answer in set is "no answer". It doesn't seem to matter, how many dates or how many suggestions are used.
Screenshot is attached.
Comment #8
SebCorbin commentedThanks a lot for this thorough testing (+screenshot), that will help me find the bug and I'll add an automatic test to it.
I'll try to reproduce and fix ad soon as I can.
Comment #9
indigoxela commentedLittle update after some more research.
Not only the last answer per set is wrong. The whole answer set is off by one.
Just coincidentally the dates I used for testing were serial (tomorrow, day after tomorrow,...)
Dates added in 7.x-2.1 are alltogether off by one here (timezone).
Your approach works fine with data added in 7.x-2.0, because it was reliably UTC.
Data added in 7.x-2.1 do use a timezone (in my case Europe/Berlin), but I see no chance to distinguish, which existing entries were UTC and which were in default (php/Drupal) timezone.
Comment #10
indigoxela commentedAny update on this issue?
The longer you wait, the worse it gets...
But I don't want to stress you out.
Comment #11
drupal-son commentedI can confirm this issue.
When the poll answer is edited from the UI and then hit the Submit button, it raises the following AJAX error:
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /system/ajax
StatusText: Internal Server Error
ResponseText: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AS revision_id, AS bundle
FROM
og_membership ogm
INNER JOIN ON . = ogm.etid
' at line 1: SELECT DISTINCT ogm.entity_type AS entity_type, ogm.etid AS entity_id, AS revision_id, AS bundle
FROM
{og_membership} ogm
INNER JOIN {} ON . = ogm.etid
WHERE (ogm.gid = :db_condition_placeholder_0) ; Array
(
[:db_condition_placeholder_0] => 2139
)
in field_sql_storage_field_storage_query() (line 652 of /srv/bindings/92f04c7dda1e48fd8780733eb40c39b6/code/modules/field/modules/field_sql_storage/field_sql_storage.module).
But after refresh the node, the updated answers are properly rendered.
If I try to delete the poll answer and confirm the action, I get the following critical error:
Notice: Undefined index: entity_type in og_query_og_membership_alter() (line 1418 of /srv/bindings/92f04c7dda1e48fd8780733eb40c39b6/code/sites/all/modules/og/og.module).
Notice: Undefined index: entity keys in og_query_og_membership_alter() (line 1421 of /srv/bindings/92f04c7dda1e48fd8780733eb40c39b6/code/sites/all/modules/og/og.module).
Notice: Undefined index: base table in og_query_og_membership_alter() (line 1427 of /srv/bindings/92f04c7dda1e48fd8780733eb40c39b6/code/sites/all/modules/og/og.module).
Notice: Undefined index: entity keys in _og_query_og_membership_alter_conditions() (line 1549 of /srv/bindings/92f04c7dda1e48fd8780733eb40c39b6/code/sites/all/modules/og/og.module).
Notice: Undefined index: entity keys in _og_query_og_membership_alter_conditions() (line 1549 of /srv/bindings/92f04c7dda1e48fd8780733eb40c39b6/code/sites/all/modules/og/og.module).
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AS revision_id, AS bundle FROM og_membership ogm INNER JOIN ON . = ogm.etid ' at line 1: SELECT DISTINCT ogm.entity_type AS entity_type, ogm.etid AS entity_id, AS revision_id, AS bundle FROM {og_membership} ogm INNER JOIN {} ON . = ogm.etid WHERE (ogm.gid = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 2139 ) in field_sql_storage_field_storage_query() (line 652 of /srv/bindings/92f04c7dda1e48fd8780733eb40c39b6/code/modules/field/modules/field_sql_storage/field_sql_storage.module).
Regards,
Ariel