I have installed Advanced Poll [v 7.x-2.x] and can now neither configure this module nor even create a Poll! I disabled the core Poll module because Advanced Poll documentation describes it as a replacement for the Drupal Core module, so that is what I thought I should do.
I believe that I have enabled all of the correct Permissions.
When I try to run update.php i get three messages: (1) "Some of the updates cannot be applied because their dependencies were not met" (2) "No Pending Updates", and (3) "The website encountered an unexpected error. Please try again later".
The reason I'm trying 7.x-2.x is that when I tried 7.x-3.x I got a message that said that there was not enough schema information in the 7.x-3.x release.
All of my Advanced Poll code is 7.x-2.x. The Voting API module version is 7.x-2.11
Wyckham
| Comment | File | Size | Author |
|---|---|---|---|
| #38 | advpoll-fix-install-errors-2193131-37.diff | 3.09 KB | cb |
| #30 | advpoll-fix-install-errors-2193131-29.diff | 2.37 KB | cb |
| #28 | advpoll-fix-install-errors-2193131-28.diff | 801 bytes | cb |
Comments
Comment #1
wdseelig commentedJust re-ran update.php and got a different message:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'GOPV7Revert.field_data_advpoll_dates' doesn't exist: SELECT n.title, n.nid FROM {node} n LEFT JOIN {field_data_advpoll_dates} d ON d.entity_id = n.nid LEFT JOIN {field_data_advpoll_closed} c ON c.entity_id = n.nid LEFT JOIN {field_data_advpoll_options} o ON o.entity_id = n.nid WHERE n.type LIKE '%advpoll%' AND o.advpoll_options_value <> 'electoral' AND o.advpoll_options_value = 'block' AND n.status = 1 AND c.advpoll_closed_value = 'open' AND d.advpoll_dates_value < NOW() AND d.advpoll_dates_value2 > NOW() GROUP BY n.nid ORDER BY n.created DESC; Array ( ) in advpoll_get_poll_info_blocks() (line 896 of /var/www/WCGOP/sites/all/modules/contrib/advpoll/advpoll.module).
This is saying that the table field_data_advpoll_dates doesn't exist, and this is correct. Three tables that do seem to be associated with Advanced Poll: advpoll, advpoll_electoral_list, and advpoll_choices ARE in my db. The first two are empty, the third has some entries that look like they came from an old poll.
Comment #2
wdseelig commentedI just ran another experiment. I disabled all 4 of the Advanced Poll modules, then manually dropped the three tables that were in my db. I then re-enabled the Advanced Poll modules and ran update.php. I got the same PDOException error message as before, and this time none of the three tables listed above: advpoll, advpoll_electoral_list and advpoll_choices is in my db.
Comment #3
wdseelig commentedI keep getting this message when running update.php after downloading versions of votingapi:
votingapi module votingapi module can not be updated. Its schema version is 9. Updates up to and including 6101 have been removed in this release. In order to update votingapi module, you will first need to upgrade to the last version in which these updates were available.
I have gone all the way back to version votingapi-7.x-2.x-dev and I still get this message.
Is there a version that will work??
Comment #4
vako commentedI am using the following versions and don't have any issues:
Drupal 7.26
Advanced Poll 7.x-3.x-dev
Voting API 7.x-2.11
Comment #5
wdseelig commentedThank you for this! I had tried all of these EXCEPT Drupal 7.26 [I am on 7.22]. I will try the Drupal upgrade and see if that helps.
Comment #6
wdseelig commentedIt DIDN'T help!
I have upgraded my site to Drupal 7.26, and am using Advanced Poll 7.x-3.x-dev and Voting API 7.x-2.11.
This time I left the core's Poll module in, so I can see [and presumably create] Polls.
However, i cannot anywhere see a link to configure an Advanced Poll, establish a list of electors, or use any of the other nifty features that are available in Advanced Poll.
I should add two things:
1) Whenever I try to enable or disable any of the Advanced Poll modules I invariably get a message that says something like "Website encountered an unexpected error -- please try again later." When I re-run the "save configuration" [sometimes more than once] it eventually goes through
2) I've noticed that in my Permissions page, the Poll module does not have any boxes to be checked to allow me to set permissions for it. [Both Advanced Poll, and Voting API modules DO have boxes in which to set permissions.
Any help gratefully received!
Wyckham
Comment #7
wdseelig commentedI noticed that my Status Report said that I should update my database by running update.php. I did so and got the following error
message [again]. Also, my site now says that it is in maintenance mode, so I may be losing the site again.
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'GOPV7Revert.field_data_advpoll_dates' doesn't exist: SELECT n.title, n.nid FROM {node} n LEFT JOIN {field_data_advpoll_dates} d ON d.revision_id = n.vid LEFT JOIN {field_data_advpoll_closed} c ON c.revision_id = n.vid LEFT JOIN {field_data_advpoll_options} o ON o.revision_id = n.vid WHERE n.type = 'advpoll' AND o.advpoll_options_value = 'block' AND n.status = 1 AND c.advpoll_closed_value = 'open' AND d.advpoll_dates_value < NOW() AND d.advpoll_dates_value2 > NOW() ORDER BY n.created DESC; Array ( ) in advpoll_get_poll_info_blocks() (line 969 of /var/www/WCGOP/sites/all/modules/contrib/advpoll/advpoll.module).
Wyckham
Comment #8
wdseelig commentedThe errors that I'm getting say that advpoll is failing to install because a table: field_data_advpoll_dates does not exist. When I check my db, I find that this is true; that table isn't in my db.
I have looked at all of the install files for the drupal 7 version of Advpoll, and that table is not instantiated in ANY of them. Is there an earlier version of advpoll that I have to install first before the Drupal 7 version??
Wyckham
Comment #9
brandonratz commentedI'm getting similar errors. However, running multisite (sites are running from identical codebase), I'm able to get Advanced Poll operating correctly on a fresh install.
Neither site will allow Decisions module to work correctly, or uninstall. I have already tried a complete uninstall/reinstall of AdvPoll with no luck.
I was able to get some functionality from AdvPoll at one point and the Content type was excluding all custom fields AdvPoll is suppose to supply. I simply had a content type called 'Advanced Poll' with title/body fields.
My errors are as follows:
WD php: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ifcs14_dev.field_data_advpoll_dates' doesn't exist: SELECT n.title, n.nid FROM {node} n [error]
LEFT JOIN {field_data_advpoll_dates} d
ON d.revision_id = n.vid
LEFT JOIN {field_data_advpoll_closed} c
ON c.revision_id = n.vid
LEFT JOIN {field_data_advpoll_options} o
ON o.revision_id = n.vid
WHERE
n.type = 'advpoll' AND
o.advpoll_options_value = 'block' AND
n.status = 1 AND
c.advpoll_closed_value = 'open' AND
d.advpoll_dates_value < NOW()
AND d.advpoll_dates_value2 > NOW()
ORDER BY n.created DESC; Array
(
)
in advpoll_get_poll_info_blocks() (line 969 of ...sites/all/modules/contrib/advpoll/advpoll.module).
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ifcs14_dev.field_data_advpoll_dates' doesn't exist: SELECT n.title, n.nid FROM {node} n
LEFT JOIN {field_data_advpoll_dates} d
ON d.revision_id = n.vid
LEFT JOIN {field_data_advpoll_closed} c
ON c.revision_id = n.vid
LEFT JOIN {field_data_advpoll_options} o
ON o.revision_id = n.vid
WHERE
n.type = 'advpoll' AND
o.advpoll_options_value = 'block' AND
n.status = 1 AND
c.advpoll_closed_value = 'open' AND
d.advpoll_dates_value < NOW()
AND d.advpoll_dates_value2 > NOW()
ORDER BY n.created DESC; Array
(
)
in advpoll_get_poll_info_blocks() (line 969 of ...sites/all/modules/contrib/advpoll/advpoll.module).
Drush command terminated abnormally due to an unrecoverable error.
Comment #10
brandonratz commentedConfirmed a fresh install of Drupal and AdvPoll required modules does in fact create the field_data_* tables necessary for this to work.
field_data_advpoll_behavior
field_data_advpoll_choice
field_data_advpoll_closed
field_data_advpoll_cookie_duration
field_data_advpoll_dates
field_data_advpoll_max_choices
field_data_advpoll_mode
field_data_advpoll_options
field_data_advpoll_results
Comment #11
brandonratz commentedI exported the tables from working installation to the non-working installation. I no longer receive errors (considering the tables now exist). However, no functionality of AdvPoll is available.
Here is the SQL if you're interested:
Comment #12
wdseelig commentedThank you for this!
This sounds like I would (1) Create a fresh Drupal installation [complete with its own new database], (2) Install advpoll in that new Drupal installation, (3) Export the tables that I need for advpoll to work, and then (4) Import those new tables to my original Drupal site. When I finished this [which wouldn't take very long], though, I would have a non-working version of advpoll.
Alternatively, of course, I could just cut/paste your SQL into a file and then import that file into my existing Drupal DB.
Also not sure why a fresh Drupal installation will create the necessary tables, but an updated version [I went from 7.22 to 7.26 yesterday] will not.
Anybody have any ideas why a fresh Drupal version will create the necessary tables, but an existing installation [even if recently updated] will not?
Comment #13
wdseelig commentedOK. I did the cut/paste with the SQL posted in #11 above. The tables in that sql were created, but when I tried to update the advanced poll by running update.php I got a new error message:
advpoll module
Update #7000
Failed: FieldException: Attempt to update a non-existent field. in field_update_field() (line 224 of /mysite/modules/field/field.crud.inc).
Also, and probably because of this failure, the table advpoll_electoral_list, which is supposed to be created in advpoll.install, wasn't.
***SIGH***
Comment #14
brandonratz commentedPossible Solution
I was able to do a removal all advpoll tables, remove field bundles advpoll setup, reset the schema_version of all advpoll modules in the system table (-1) to get Drupal to see the module as uninstalled. Once I re-enabled the module it installed correctly.
Comment #15
wdseelig commentedCannot find "field bundles advpoll setup"? Can you say what this is?
Comment #16
wdseelig commentedOK. I went all the way back to square 1.
After doing this, I confirmed that my modules listing page didn't show either votingapi or advpoll.
I then downloaded advpoll [version 7.x-3.x-dev], and votingapi [version 7.x-2.11].
I then enabled first votingapi [no problem] and the various advpoll modules. As I was enabling the advpoll modules I got the "Website encountered unexpected error" message mentioned in #8 above. This happened twice, then the enabling went through.
When I then inspected my database, I found that I DID have the advpoll_electoral_list table, but did NOT have any of the field_data_advpoll_* fields mentioned in #10 above. Also, when I looked at my system table, the schema version for advpoll showed as -1 [shouldn't it be 7000]?
When I then went to my site, I found that I now had an Advanced Poll content type, but I could not create an instance of this type: When I tried to do so, the module kept asking me to enter at least two choices. I added two "choice" fields to the content type that I was creating, but this didn't help.
Also, I could not find an Advanced Poll configuration page, and could not see a way to utilize the electoral list.
Would be grateful for any help.
Wyckham
P.S. This is, as indicated, now version 7.x-3.x-dev, so I suppose I should repost it?
Comment #17
brandonratz commentedWhat I meant was that I removed all rows in the 'field_config' and 'field_config_instance' tables where advpoll was set in the 'bundle' column.
Comment #18
brandonratz commentedThe goal is to get the module completely uninstalled and reinstalled. I had errors uninstalling as the module wouldn't complete the uninstall because of database errors. The schema version shouldn't be set if the module is uninstalled. The schema version being set imply that the tables exist in the first place.
Comment #19
wdseelig commentedThanks very much for this.
I'm running out of time to try to redo all of this, but if I can get back to it today, I'll let you know what happens.
Wyckham
BTW: There is no "bundle" column in my field_config page, but for two rows advpoll is entered in the "type" column and advpoll_field is in the "module" column.
Comment #20
vako commentedSince I have this module working ok for me, let me know if you need any DB or other information from me for troubleshooting or comparison purposes.
I am using the Zeropoint theme, not sure if that matters.
What I would also suggest to isolate the issue is to get a new domain with Drupal installed with the default theme and no other modules. If it works, then start adding the other modules one-by-one until you find which one of them might be causing the issue.
Unfortunately we aren't getting any help from the maintainer or other users of this module. It seems neglected.
Comment #21
vako commentedActually the best response you will get if you post this topic in the Post Installation area: https://drupal.org/forum/22 where it will be exposed to all and not only Advanced Poll users. Since it is a DB issue, you might get a solution.
Comment #22
wdseelig commentedThank you Brandon! Deleting those entries from the field_config and field_config_instance tables apparently did the trick. I am now able to create advanced polls, vote in those polls, use the Electoral List, etc.
Hooray!
Comment #23
wdseelig commentedThank you Vako. As you'll see from #22 above, I eventually got this to work. It appears that the issue all along was a [silently] bad installation. I can't, for the life of me, figure out what I did wrong the first time I installed this, but have to conclude that this was mostly MY BAD.
One thing I clearly don't understand, and would like to read about, would be "How to remove a module using unix commands and a database access program". Who knew, for example, that I had to delete entries in the fields_config and fields_config instances tables?
Comment #24
hjulien commentedI had the same PDOException as above regarding advpoll_dates not existing. I upgraded from 6.x-1.x-dev to 7.x.3.x-dev. This isn't an issue to do with dev versions is it?
Here's the message I got when I ran update.php:
dvpoll module
Update #7000
Failed: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'xxxx_drupal.field_data_advpoll_options' doesn't exist: DELETE FROM {field_data_advpoll_options} WHERE (advpoll_options_value = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => showvotes ) in advpoll_update_7000() (line 816 of /home/xxxxxxxxxx/public_html/sites/all/modules/advpoll/advpoll.install).
Comment #25
dimmie commentedSimilar problems here, after an upgrade from 6.35 to 7.36.
I had been using advpoll before the upgrade.After (re-)enabling advpoll, I found no way to put my Drupal 7 system in a state which did not require an (impossible) update.
The only way for me to get a functional system was to reload the upgraded data base and, using phpmyadmin, manually remove all entries relating to my (one and only !) ranking poll before dropping the advpoll tables. That cleanup done, I was pretty glad to have only to do it for one poll.
Now that I have a DB free of adv-poll entries or tables, I could try to install advpoll-7.x-3.x-dev, if it helps.
-rg-
Comment #26
jomarocas commentedhi, the solutions is, install this patch to core https://www.drupal.org/node/1812056 or install drupal core 7.37 this patch is commit in the next release, later install adv_poll and working.
dont forget uninstall advpoll before apply patch, and later install
Comment #27
dimmie commentedIt first looked very bad.
Started with a clean DB, no advpoll in sites/all/modules, Drupal @ 7.37.
Unpacked advpoll-7.x-3.x-dev.tar.gz; ran update.php - which ends with an error message. Sorry, message lost.
Tried to enable Advanced Poll itself - Date Popup was automatically enabled too.
Ran update.php, results in error message
==================================
PDOException : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'edusatorg001.field_data_advpoll_dates' doesn't exist: SELECT n.title, n.nid FROM {node} n LEFT JOIN {field_data_advpoll_dates} d ON d.revision_id = n.vid LEFT JOIN {field_data_advpoll_closed} c ON c.revision_id = n.vid LEFT JOIN {field_data_advpoll_options} o ON o.revision_id = n.vid WHERE n.type = 'advpoll' AND o.advpoll_options_value = 'block' AND n.status = 1 AND c.advpoll_closed_value = 'open' AND d.advpoll_dates_value < NOW() AND d.advpoll_dates_value2 > NOW() ORDER BY n.created DESC; Array ( ) dans advpoll_get_poll_info_blocks() (ligne 969 dans /ligo/www/edu7xx/sites/all/modules/advpoll/advpoll.module).
==================================
and site gone off-line !!!
Time for a clean-up, now. Site off-line.
Successively disabling both modules. Attempting to de-install Advanced Poll, then Advanced Poll Field. Ah ! This works, now !
Running update.php - no nasties, *NO* update pending, this time.
Cannot install, but can now deinstall without hammer and wrench. Great !
Assuming the DB cleanup wasn't perhaps thorough enough, and the clean deinstallation had remedied that ...
Restarted the two-step module installation. Ran update.php without a hitch.
Truely, it worked ! Thanks a lot !
Comment #28
cbFor me, this was all happening because the install hook failed.
It failed when creating a table "advpoll_choice_Array" which is obviously not the correct name. After lots of digging and hacking, I discovered the problem was occurring when the fields were being created and this one particular field 'advpoll_choice' was failing.
Rather than install the tables manually, as tempting as that was, I fixed the field definition in the install hook.
Simple, small issue but this has fixed the install process for me. Patch attached.
Comment #30
cbWhile my last patch *may* help some of you, its not a silver bullet.
It will get you past the field creation bug but you may run into another error;
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytesThis is because the indexes combined in that table are greater that the limit imposed by MySQL (In this case 767 bytes.)
(Note advpoll_choice_choice is a varchar(500), bundle is varchar(128), entity_type is varchar(128), language is varchar(32) which equals 788. (Please correct me if I'm wrong here as I believe this is how the limit is applied.)http://mechanics.flite.com/blog/2014/07/29/using-innodb-large-prefix-to-... writes;
I was able to run the install locally but it fell over on dev. After some research I discovered that there is a variable in MySQL allowing larger limits for these indexes and that it was enabled on my local machine (MAMP default perhaps) and not enabled on dev & prod;
So, we could try to have fewer indexes with smaller sizes or we just increase this variable.
Also cleaned the patch and made sure all indexes were uniform in format.
Comment #31
cbComment #33
cbMy patch is against 7.x-3.x not 7.x-2.x hence it is failing.
Comment #34
tripper54 commentedok, let's try that again shall we?
Comment #36
cbConsidering this issue was about 7.x-2.x I didnt want to change the version merely for testing my patch, discussion was still regarding 2.x.
Comment #37
cbNew patch.
I had to remove the 'choice' key entirely so I could install this across different instances. Changing the key length limit for me is just not a viable option.
Comment #38
cbPatch
Comment #39
tripper54 commentedComment #40
tripper54 commentedThe patch applies cleanly and does what it says. I'm reluctant to mark RTBC though as installation works fine for me with or without this patch.
Interestingly I'm using MAMP, and innodb_large_prefix is OFF.
Another user reported install errors at #2505491: Error at installation! and I have pointed them here. If the patch works for them, I'll RTBC it.
Comment #41
tripper54 commented..and this patch fixed #2505491: Error at installation!. Committed.