Closed (fixed)
Project:
Flag
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
8 Sep 2008 at 07:46 UTC
Updated:
14 Jul 2012 at 19:33 UTC
Jump to comment: Most recent file
(A beta breaker.)
Users __who used__ the old actions support in beta3 and upgrade to the new "dev" will encounter 'http error 200'. These are caused by PHP errors such as:
Fatal error: Call to undefined function flag_action_email() in [...]/includes/actions.inc on line 99
That's because Actions tries to call action callbacks that we no longer provide:
flag_action_email
flag_action_delete
flag_action_unpublish
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | circ_db_prefix.diff | 1.82 KB | mooffie |
| #15 | better_detect_actions_two.diff | 743 bytes | mooffie |
| #12 | diag.diff | 2.75 KB | mooffie |
| #3 | remove_old_actions.diff | 2.03 KB | mooffie |
Comments
Comment #1
mooffie commentedIt's not easy to fix this.
The actions_synchronize() function can delete orphan actions, but we shouldn't use it, as it may delete actions not belonging to us, whose modules the user temporarily disabled. Besides, the Actions module may not be enabled.
We can't just do action_delete(), because Actions may not be enabled. So we'll have to do double work: both action_delte() and SQL.
Comment #2
mooffie commentedComment #3
mooffie commentedHere's a patch.
Comment #4
archetwist commentedI know you have many tasks and limited time but this patch (if I understand the code correctly) is another reason to provide an upgrade path for users of the beta3 version. It wouldn't be a pleasant surprise to loose all the configured actions and the ability to restore them (by reverting back to beta3, for example).
One other thing. Does this patch fix the issue with e-mails not being sent? I've configured new actions using the dev version but no message is sent.
Thanks.
Comment #5
mooffie commentedHow are we going to upgrade an 'email' action? We don't know that 'Token actions' will be installed.
Nate, what are your thoughts on this?
I haven't checked this yet. Please open a new issue (Things to check: 1. do other actions work? 2. if you're not using a token in the 'recipient', does the mail get sent?).
Comment #6
archetwist commentedIn this case, I think a big warning "Backup your data" will suffice ;) .
Will do. Thanks.
Comment #7
mooffie commentedCommitted.
http://drupal.org/cvs?commit=139127
http://drupal.org/cvs?commit=139126
We'll do that.
Comment #8
mooffie commentedArchetwist,
I've just checked this, and this action do work for me. Perhaps there's some problem with the token you use for the recipient. Put that token in the body of the email, and type a fixed email address for the recipient. This way you'll find out to what string the token expands to.
Note that there's one bug I'm aware of:
When you're flagging a comment, the event won't expose the node it belongs to, so node tokens, e.g. [node-author-email], won't work. I hope to fix that very soon.
Comment #9
archetwist commentedApparently, there is something wrong with the Token module (or my website's configuration). I've been trying to use the
[author-mail]token (in the aforementioned action which I've created using the standard Drupal interface) but it's treated literally (doesn't expand). Here is a support request I've opened.Comment #10
archetwist commentedI've installed the newest dev version and executed the
update.phpscript (no queries were executed). All the old actions are still active and I get the infamous error message.Comment #11
mooffie commentedGo there again. Open the "Select versions" fieldset. Under "flag module" you'll see "No updates available". Click this drop-down. Do you see "6000"?
We can't know.
My upgrade path won't report any quries it might have executed. I'm not to blame.
I'll have to put some diagnostic messages there.
(Do you happen to have an 'actions_registry' table in your database?)
Comment #12
mooffie commentedI added diagnostic messages to the upgrade path. Note that it takes hours for D.O. to repackage the 'dev'.
You should revisit 'update.php'. In the flag module's dropdown you could change "No updates available" to "6000", then submit the form.
Comment #13
mooffie commentedComment #14
archetwist commentedI just cited the message I got from
update.php.I do. It's empty.
Result:
Comment #15
mooffie commentedAhhh!! That's it!
The short story: there are two versions of Actions, "1.x" and "2.x".
The upgrade path looked for an "actions_registry" table to determine if the old Actions 1.x is installed, and, in this case, to bail out.
I changed the logic to detect Actions 2.x (or Trigger) in a safer way now.
(Either wait several hours or apply the patch; you can do it by hand: the change is simple enough. Then go to "upddate.php", select "6000", and submit.)
Comment #16
mooffie commentedArchetwist, the help you give me, us, in this queue, is invaluable! Thanks.
Comment #17
archetwist commentedI am glad my reports are of good use :) , though I'm afraid this issue is still unresolved. After applying your modifications to the
flag.installfile I get the same message.Additional info:
db_table_exists('actions_assignments')returns 0 even though the table is present:Comment #18
mooffie commentedYou say the table is there in the database? Could you please double check that you've looked up in the right database? (I myself have 7 Drupal databases right now, so it's possible to err.) Because it's weird that db_table_exists() should fail.
Another question, more important: do you have a 'trigger_assignments' table in your database?
Comment #19
archetwist commentedI even triple checked it. It's been quite a shock for me, too :) .
I do.
I don't know if this is relevant but I'm using the multi-site feature and share some tables between multiple databases. However,
actions_assignmentsis not one of these tables.Comment #20
mooffie commentedArchetwist,
1. What does
print db_prefix_tables('{trigger_assignments}');print?2. Does
db_table_exists('node')returns TRUE?Comment #21
archetwist commented1.
archekrk_drupalorgpl.trigger_assignments2. It returns FALSE...
Comment #22
mooffie commentedTurns out db_table_exists() doesn't work if there's a dot in $db_prefix:
#286986: MySQL: SHOW TABLES LIKE database.tablename doesn't work
I tweaked the conditional a bit.
Again, either wait a couple of hours, or apply the patch.
Comment #23
archetwist commentedFinally! The patch works perfectly.
Comment #24
mooffie commentedArchetwist, thank you for all the tests and reports!
===
I fixed this yesterday.
Comment #25
archetwist commentedGood teamwork!
Comment #26
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.