Closed (fixed)
Project:
Drupal core
Version:
6.22
Component:
trigger.module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Jun 2010 at 06:44 UTC
Updated:
30 Nov 2011 at 03:26 UTC
Jump to comment: Most recent file
Comments
Comment #1
eric-alexander schaefer commentedCan you please explain step by step how you tried to unpublish a node and what went wrong?
Comment #2
Hans Lodder commentedBy all means. We are in a habit to publish each Saturday a new story. I do this with the help of Scheduler.
Last Friday I made a mistake, I created the story without Scheduling it. So I edited the story and removed the Publish click. That did not work. The story remained published. I solved it by deleting the story, and create it again.
Then I remembered form some time ago, August 2009, that I used Scheduler to Unpublish a story. That did not work either.
Before I started using Scheduler I was able to publish and unpublish stories by marking the publish click in a story.
So I am interested in how to recover that functionality again.
Is there a way you can help me?
Kind regards,
Hans Lodder
Comment #3
eric-alexander schaefer commentedThis is really weird. It should be the other way around. If you enter a publish-on time scheduler should unpublish the story on saving (because scheduling the publication for a already published story makes no sense).
Please try this if possible:
- disable scheduler module
- create a dummy story and make sure "published" is selected
- save
- edit the story and unselect "published"
- save
Is the story now unpublished?
(now delete the story and enable scheduler)
Comment #4
Hans Lodder commentedYou provided a good advice. I disabled Scheduler and created and edited the dummy story. It remains published. The Drupal message is that the changed story is saved, but it does not save the unpublish mark.
So it is not a problem in Scheduler.
I performed my test as user/1, so I should have all necessary authorizations. The check mark can be set, so obviously it exists as a field in the database. I do not think I ever experienced problems upgrading either Drupal or Scheduler.
Do you have any ideas what the real problem could be, or how I can find it?
Kind regards, and thanks in advance,
Hans Lodder
Comment #5
eric-alexander schaefer commentedI assume you have some PHP experience. Tell me if you don't, I will then provide you with a test file.
Insert this line at the begining of
node_load(),node_save()andnode_submit()in modules/node/node.module (after$node = (object)$node;if present):(replace "function_name" with the name of the function, like
node_load)Comment #6
Hans Lodder commentedYes. I think I can perform this PHP edit task. I include my new node.module file.
I again unpublished my dummy page. This is what I read in error log:
content 28/06/2010 - 11:34 story: updated dummy. webmaster view
action 28/06/2010 - 11:34 Set Story dummy to published. webmaster
And yes, it is still published.
What are my next steps?
Kind regards, hans
Comment #7
eric-alexander schaefer commentedAre there any lines in the log with "DEBUG" in the type columns when you try to unpublish a node?
Comment #8
Hans Lodder commentedHi Eric!
No, only from the module db-maintenance. My exact steps:
1. Show recent log entries
Latest entry: user 30/06/2010 - 07:54 Deleted user: queuemoacax ... webmaster
2. Add story (and publish; show log entries)
Latest entry: content 30/06/2010 - 08:27 story: added dummy. webmaster view
3. Unpublish story
Latest entry:
content 30/06/2010 - 08:28 story: updated dummy. webmaster view
nodewords 30/06/2010 - 08:28 User webmaster changed the meta tags for ... webmaster
action 30/06/2010 - 08:28 Set Story dummy to published. webmaster
4. Edit story (published still set)
5. Delete story
Latest entry:
content 30/06/2010 - 08:29 story: deleted dummy. webmaster
content 30/06/2010 - 08:28 story: updated dummy. webmaster view
nodewords 30/06/2010 - 08:28 User webmaster changed the meta tags for ... webmaster
6. List all recent log entries (including 1st shown)
content 30/06/2010 - 08:29 story: deleted dummy. webmaster
content 30/06/2010 - 08:28 story: updated dummy. webmaster view
nodewords 30/06/2010 - 08:28 User webmaster changed the meta tags for ... webmaster
action 30/06/2010 - 08:28 Set Story dummy to published. webmaster
content 30/06/2010 - 08:27 story: added dummy. webmaster view
nodewords 30/06/2010 - 08:27 User webmaster changed the meta tags for ... webmaster
action 30/06/2010 - 08:27 Set Story dummy to published. webmaster
user 30/06/2010 - 07:54 Deleted user: queuemoacax ... webmaster
I can only agree with 1 of your 1st comments: Very weird indeed.
I gather you checked whether my php-changes were in-line with your suggestions.
I appreciate your help. Is there anything else I can do?
Regards, hans
Comment #9
Hans Lodder commentedI am deeply ashamed for myself!
In the edited code I used the wrong comment statement. As a result the watchdog code never was called and executed. Today i discovered that.
If I unpublish a node the watchdog output is:
content 06/07/2010 - 11:31 story: updated dummy. webmaster view
nodewords 06/07/2010 - 11:31 User webmaster changed the meta tags for ... webmaster
DEBUG 06/07/2010 - 11:31 node_save/node->status = 1 webmaster
action 06/07/2010 - 11:31 Set Story dummy to published. webmaster
DEBUG 06/07/2010 - 11:31 node_sumbmit/node->status = 0 webmaster
DEBUG 06/07/2010 - 11:31 node_load/node->status = webmaster
Does this output make sense to you?
Kind regards, hans
Comment #10
eric-alexander schaefer commentedThis is really weird. According to the second line from the bottom the state of the node is correctly getting set to 0 at submit.But then an action (possibly node_publish_action) gets triggered which sets the node back to published. But I have no idea what caused this. I would probably try to disable module by module until the unpublishing works again to find out which module does that.
Comment #11
Tambitch commentedI had the same problems and it went away when I disabled the core-module "Trigger"
Comment #12
lhubbert commentedThanks, Tambitch. Disabling Trigger worked for me too. Thank goodness, I thought I had a long weekend of work ahead of me.
Comment #13
eric-alexander schaefer commentedComment #14
Hans Lodder commentedHi!
Did someone report this error as an error in the Drupal Core / Optional programs?
Regards, hans
Comment #15
hvalentim commentedSame problem here. Suddenly it was impossible to unpublish a node. Disabled Trigger and it started working fine.
Comment #17
kalilo commentedThanks, I had the same problem, solved it by disabling Trigger.
Comment #18
mrP commented+1
stumbled on this post and disabling trigger solved my unpublish woes.