Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I tried to install HEAD on SQLite and got the errors below.
The installation has encountered an error.
Please continue to the error page
An HTTP error 500 occurred.
http://sqlite.john.users.localdomain/install.php?locale=en&profile=default&id=1&op=do
* All necessary changes to ./sites/default and ./sites/default/settings.php have been made, so you should remove write permissions to them now in order to avoid security risks. If you are unsure how to do so, please consult the online handbook.
* PDOException: UPDATE {menu_links} SET menu_name=:db_update_placeholder_0, plid=:db_update_placeholder_1, link_path=:db_update_placeholder_2, router_path=:db_update_placeholder_3, hidden=:db_update_placeholder_4, external=:db_update_placeholder_5, has_children=:db_update_placeholder_6, expanded=:db_update_placeholder_7, weight=:db_update_placeholder_8, depth=:db_update_placeholder_9, p1=:db_update_placeholder_10, p2=:db_update_placeholder_11, p3=:db_update_placeholder_12, p4=:db_update_placeholder_13, p5=:db_update_placeholder_14, p6=:db_update_placeholder_15, p7=:db_update_placeholder_16, p8=:db_update_placeholder_17, p9=:db_update_placeholder_18, module=:db_update_placeholder_19, link_title=:db_update_placeholder_20, options=:db_update_placeholder_21, customized=:db_update_placeholder_22 WHERE (mlid = :db_condition_placeholder_34) AND ( (menu_name <> :db_condition_placeholder_11) OR (menu_name IS NULL) OR (plid <> :db_condition_placeholder_12) OR (plid IS NULL) OR (link_path <> :db_condition_placeholder_13) OR (link_path IS NULL) OR (router_path <> :db_condition_placeholder_14) OR (router_path IS NULL) OR (hidden <> :db_condition_placeholder_15) OR (hidden IS NULL) OR (external <> :db_condition_placeholder_16) OR (external IS NULL) OR (has_children <> :db_condition_placeholder_17) OR (has_children IS NULL) OR (expanded <> :db_condition_placeholder_18) OR (expanded IS NULL) OR (weight <> :db_condition_placeholder_19) OR (weight IS NULL) OR (depth <> :db_condition_placeholder_20) OR (depth IS NULL) OR (p1 <> :db_condition_placeholder_21) OR (p1 IS NULL) OR (p2 <> :db_condition_placeholder_22) OR (p2 IS NULL) OR (p3 <> :db_condition_placeholder_23) OR (p3 IS NULL) OR (p4 <> :db_condition_placeholder_24) OR (p4 IS NULL) OR (p5 <> :db_condition_placeholder_25) OR (p5 IS NULL) OR (p6 <> :db_condition_placeholder_26) OR (p6 IS NULL) OR (p7 <> :db_condition_placeholder_27) OR (p7 IS NULL) OR (p8 <> :db_condition_placeholder_28) OR (p8 IS NULL) OR (p9 <> :db_condition_placeholder_29) OR (p9 IS NULL) OR (module <> :db_condition_placeholder_30) OR (module IS NULL) OR (link_title <> :db_condition_placeholder_31) OR (link_title IS NULL) OR (options <> :db_condition_placeholder_32) OR (options IS NULL) OR (customized <> :db_condition_placeholder_33) OR (customized IS NULL) ) - Array ( [:db_update_placeholder_0] => navigation [:db_update_placeholder_1] => 0 [:db_update_placeholder_2] => batch [:db_update_placeholder_3] => batch [:db_update_placeholder_4] => -1 [:db_update_placeholder_5] => 0 [:db_update_placeholder_6] => 0 [:db_update_placeholder_7] => 0 [:db_update_placeholder_8] => 0 [:db_update_placeholder_9] => 1 [:db_update_placeholder_10] => 1 [:db_update_placeholder_11] => 0 [:db_update_placeholder_12] => 0 [:db_update_placeholder_13] => 0 [:db_update_placeholder_14] => 0 [:db_update_placeholder_15] => 0 [:db_update_placeholder_16] => 0 [:db_update_placeholder_17] => 0 [:db_update_placeholder_18] => 0 [:db_update_placeholder_19] => system [:db_update_placeholder_20] => [:db_update_placeholder_21] => a:0:{} [:db_update_placeholder_22] => 0 [:db_condition_placeholder_34] => 1 [:db_condition_placeholder_11] => navigation [:db_condition_placeholder_12] => 0 [:db_condition_placeholder_13] => batch [:db_condition_placeholder_14] => batch [:db_condition_placeholder_15] => -1 [:db_condition_placeholder_16] => 0 [:db_condition_placeholder_17] => 0 [:db_condition_placeholder_18] => 0 [:db_condition_placeholder_19] => 0 [:db_condition_placeholder_20] => 1 [:db_condition_placeholder_21] => 1 [:db_condition_placeholder_22] => 0 [:db_condition_placeholder_23] => 0 [:db_condition_placeholder_24] => 0 [:db_condition_placeholder_25] => 0 [:db_condition_placeholder_26] => 0 [:db_condition_placeholder_27] => 0 [:db_condition_placeholder_28] => 0 [:db_condition_placeholder_29] => 0 [:db_condition_placeholder_30] => system [:db_condition_placeholder_31] => [:db_condition_placeholder_32] => a:0:{} [:db_condition_placeholder_33] => 0 ) SQLSTATE[HY000]: General error: 25 bind or column index out of range in menu_link_save() (line 2168 of /home/john/public_html/sqlite/includes/menu.inc).
The website encountered an unexpected error. Please try again later.
Comments
Comment #1
Damien Tournoud CreditAttribution: Damien Tournoud commentedI really can't see anything wrong with that query. Could you please report your SQLite and PHP versions?
Comment #2
Damien Tournoud CreditAttribution: Damien Tournoud commentedComment #3
Crell CreditAttribution: Crell commentedLooks like a case of this: http://drupal.org/node/320510#comment-1138524
Comment #4
Damien Tournoud CreditAttribution: Damien Tournoud commentedOk, there was a bug in the SQLite replacement of unamed placeholders: it replaced all matches of a given placeholder (so both ':db-update-1' and ':db-update-11' where replaced. Fixed to replace only true placeholders.
Note that SQLite is also broken because of #342693: SQLite broken: DatabaseStatementPrefetch iterator implements a scroll cursor, not a forward only one. Please apply both patch for testing purposes.
Comment #6
Dave ReidMarked #342725: Broken HEAD - Super long update queries as a duplicate of this bug.
Comment #7
Dave ReidBumping this to critical since this is essential to fixing broken HEAD on sqlite.
Comment #8
Dave ReidRevised patch without commenting out the error handling. Confirmed with this patch I can now install HEAD.
Comment #9
Dave ReidMarking code needs review.
Comment #10
Crell CreditAttribution: Crell commented[^a-zA-Z0-9-] can be shortened to [^\W-], can't it?
I know it's one line, but anything involving a regex needs a direct comment, IMO. Those things are ridiculous to try and figure out otherwise, even if relatively simple.
Comment #11
Dave ReidIt should actually be [^\w-]. Not sure what comment to put there, I was just re-formatting #4.
Comment #12
chx CreditAttribution: chx commentedWord character, I would rather not try. This is fine as it is. And no, not every regex needs a comment if it's trivial like that. It can be that you dislike regex as I dislike OOP but that does not mean we should comment every single occurence.
Comment #13
chx CreditAttribution: chx commentedOn IRC we discussed and there is a need for a comment and the regex can and should be shortened to
(?!\w)
.Comment #14
Dave ReidRevised patch using /b to make sure the placeholder ends in a word boundary.
Comment #15
John Morahan CreditAttribution: John Morahan commentedThat looks even better, but now it doesn't need the '$1' because there is no final matching character to tack back on.
Comment #16
Dave ReidOops.
Yay...I can install HEAD on sqlite again!
Comment #17
Damien Tournoud CreditAttribution: Damien Tournoud commentedComment #18
John Morahan CreditAttribution: John Morahan commentedOk, with this patch alone I can install HEAD again, but not do much else. With this plus #342693: SQLite broken: DatabaseStatementPrefetch iterator implements a scroll cursor, not a forward only one I can install and run the tests on SQLite: 7469 passes, 11 fails, and 0 exceptions. The fails are in search and user. I don't know what causes them but they are all in ordering tests, so maybe they're related to the other patch which does stuff with cursors and iteration. This patch here looks good to me.
One very minor nit though, the example placeholders in the comments should use '_' not '-'. Attached patch changes this but is otherwise identical to #16.
Comment #19
John Morahan CreditAttribution: John Morahan commentederr... without the .htaccess bit. sorry
Comment #20
hswong3i CreditAttribution: hswong3i commentedSubscribe
Comment #21
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.