warning: pg_query() [function.pg-query]: Query failed: ERROR: missing FROM-clause entry for table "blocks" in /home/BPM/docs/includes/database.pgsql.inc on line 139.
user warning: query: DELETE FROM drupal_blocks WHERE blocks.module = 'image_attach' AND blocks.delta = 0 in /home/BPM/docs/sites/all/modules/image/contrib/image_attach/image_attach.install on line 123.
image_attach module
Update #6101
Failed: DELETE FROM {blocks} WHERE blocks.module = 'image_attach' AND blocks.delta = 0
This occurs because of drupal_ table name prefix. Should be:
DELETE FROM {blocks} WHERE {blocks}.module = 'image_attach' AND {blocks}.delta = 0
or simply:
DELETE FROM {blocks} WHERE module = 'image_attach' AND delta = 0
Comments
Comment #1
jandd CreditAttribution: jandd commentedThe following patch fixes the issue:
Comment #2
Dret CreditAttribution: Dret commentedA similar problem appear upgrading from alpha4 to alpha6.
This patch resolve also this one??
This is the log file:
Thanks!
Comment #3
joachim CreditAttribution: joachim commentedI don't understand why the {image_attach are failing. Could you file a new issue for that please? mention the update number in the title.
@jandd: your patch looks fine. Will commit when I am able to.
Comment #4
Dret CreditAttribution: Dret commentedSorry, I don't understand your request.
Please can you explain me better what i have to do?
Thanks a lot!
Bye!
Comment #5
joachim CreditAttribution: joachim commented@Dret: your bug is a different problem, please file new issue. Mention "update 6100" in the title please.
Comment #6
Dret CreditAttribution: Dret commentedOk, i'll do it!
Thanks!
;)
Ps. now you are talking about: in my log file there's indications for a failure in update 6100 and 6010 too.
Comment #7
rsvelko CreditAttribution: rsvelko commentedI prefer the simpler method:
DELETE FROM {blocks} WHERE module = 'image_attach' AND delta = 0
Has this already been patched?
Comment #8
joachim CreditAttribution: joachim commentedNot yet; this issue will get marked 'fixed' once it's fixed ;)
I have little net access until conference, sun has none I think.
Comment #9
joachim CreditAttribution: joachim commentedFixed image_attach_update_6101.
This means that anyone who has installed alpha 6 will need to re-run 6101 when they install the next release.
Comment #10
rsvelko CreditAttribution: rsvelko commentedIf it is safe - you can paste 6101 into the header of the next one... If it runs twice it wont hurt? Sorry if I have said sth very stupid - I am tired right now and somewhere in the back of my mind there is this thought that this can be fixed for all users by re-running it twice - to cover users that had the un-patched version on a next update... while still not creating problems to others..
Comment #11
joachim CreditAttribution: joachim commentedHmm, I'd rather not put the same query into another update function, especially as alpha 6 has had a shelflife of only 6-7 days!
Will put a note in the release notes for beta 1.
Basically, if you still haven't got the attached images block you can either:
1. in the exec PHP block, include the image_attach.install file and run image_attach_update_6101().
2. run the query from image_attach_update_6101() in code.
3. kill that row yourself in the database.
Comment #12
rsvelko CreditAttribution: rsvelko commentedI killed it with mysql
Comment #13
2noame CreditAttribution: 2noame commentedI don't understand how to do any of these options. Is there anything else I can do? Will future releases fix this or do I have no choice but to do one of these at some point because I installed Alpha6? Can I rerun something with update.php?
Comment #14
joachim CreditAttribution: joachim commentedRunning update.php will rerun functions you don't want to rerun: don't do this.
To fix:
1. Enable the Execute PHP block.
2. Run this line of code in the block:
Comment #15
2noame CreditAttribution: 2noame commentedThank you, that's very handy to know for future use.
Comment #16
roderikDatabase strictness police reporting ;-)
The 'delta' column is a VARCHAR, so strict databases (like PostgreSQL) fail. Patch below.
Comment #17
patryk CreditAttribution: patryk commentedComment #18
joachim CreditAttribution: joachim commentedCommitted.
Thanks for the fix!
Comment #20
libre fan CreditAttribution: libre fan commentedDELETE FROM {blocks} WHERE module = 'image_attach' AND delta = 0
I'd like to make sure: Do you run this command this within Mysql (or PHPMyAdmin)?
Hey guys, think not all of us are experts. Please explain things as if some of us were dumb (which none of us is of course) ;-)
Quite, and how do you achieve that?
Cheers
Comment #21
joachim CreditAttribution: joachim commentedYes. It's a query, it runs within SQL. Either of those will do.
> Kill that thing in a row
PHPMyAdmin has a clicky X icon next to each table row it lists. That just deletes the row.