68 pointsSerious WPMU DEV-sterI'm new here
oncourssadmin
Member
—
31st January 2012
I've had the automessage plugin installed for about a week with blog level messages set to send immediately and after a 1 day delay. The messages scheduled to send immediately seem to work fine but the one with the time delay hasn't sent anything yet even though there are currently 11 messages in the queue that have been there for many days.
I've tried forcing the queue to process with no luck and I've checked that the message isn't paused.
Any help would be greatly appreciated.
I've had the automessage plugin installed for about a week with blog level messages set to send immediately and after a 1 day delay. The messages scheduled to send immediately seem to work fine but the one with the time delay hasn't sent anything yet even though there are currently 11 messages in the queue that have been there for many days.
I've tried forcing the queue to process with no luck and I've checked that the message isn't paused.
Any help would be greatly appreciated.
Can you have a quick scan of your php error log for me if you have access to it - just in case there is anything in there related to automessage.
Also, if you can, let me know the contents of the wp_am_queue and wp_am_schedule tables in your DB (if you have multi-db enabled then they will be in the global db)
Hi Barry,
I checked the error log and didn't see anything related to automessage in the latest 300 messages.
also, I can't seem to find the tables in the global db. Sorted alphabetically, the table names go directly from "wp_1_wpsc_variation_values_assoc" to "wp_batch_create_queue" with no wp_am tables anywhere in sight. I scanned through the other databases just in case I had the wrong database and I didn't see wp_am tables in any of the other databases, I also tried running "SELECT * FROM wp_am_queue;" against a couple of the databases, including global, but all I got returned was an error that the table doesn't exist.
I double checked that the plugin is still installed and it's still there.
Is it possible that the tables somehow got removed but the plugin isn't showing any errors or is it more likely that I'm just being a little dim and missed the tables entirely?
I don't know if we've tried to add any messages other than just the two and we are able to edit messages so the tables have to be somewhere, I must have just missed them somehow.
The message with the delay says it has 11 messages in the queue. I'm not sure if I'm able to see the individual messages or, if I can, how I would do so.
I'm going to look at the database again just to be sure that I wasn't looking in the wrong spot or looked right at the tables and didn't realize it.
Ok, it seems to be storing the messages and the queues against it then - which means the data is in your system for the admin side of things, but is getting lost for the message sending part.
I'll follow that code through and see if I can work out why. Do you have it network activated, or just on the main site?
@oncourseadmin - apologies for the long time between responses - I've been hunting through things and will be uploading an update, as soon as I finish the final little bit of testing, which should sort out this issue.
Hi Barry,
We currently have over 300 sites on our network, so I just have a question to be sure that everything works smoothly.
If we activate the updated plugin and enter the messages, is there a way that the existing sites don't get the older messages but do get any new ones without removing and re-creating the 300 sites?
Yes, it's a bit of a hack but if you can access your database and look at the wp_blogs table, find the highest ID in that table and make a note of it.
Then, have a look in wp_options - you are looking for a record with an option_name of automessage_max_blog_ID. Set the option_value of that record to your maximum ID and the plugin will only look at blogs with an ID greater than that value (i.e. new ones).
We still want to be sending any new messages that we create to the sites that are already created but not send those sites messages that are currently entered.
So, for example, site a is already created and we don't want site a to receive messages that are already entered. We set up the plugin with the changes you just suggested. We create site z which starts getting messages. After site z receives all the messages in the series, we decide that we want to add a message to the series and we want both site a and site z to receive this message.
Will site a get the new message that we just entered or will it just skip site a and go right to site z?
If site a would not get the new message, would setting the automessage_max_blog_ID value back to its original value allow us to achieve this?
I hope that was a little clearer but it's entirely possible that I just made everything less clear.
If I'm just making less sense that I can test it and find out myself but I would prefer to not have to do that unless really I have to.
We still want to be sending any new messages that we create to the sites that are already created but not send those sites messages that are currently entered.
Automessage doesn't do that I'm afraid. A site is added to the automessage queue when it is created and works it's way through the existing messages until it reaches the last message in the queue. If there are no more messages in the queue after that last message is sent, it effectively drops off the end of the queue and is never sent a message by automessage again.
Ok, I've applied the update and checked the change to my database (automessage_max_blog_ID was already changed to the highest blog id, maybe the update did that?) I'll report back soon with the results.
Responses (19)
Lead Developer — 31st January 2012 #
Note there is public traffic to the main site, and it's network activated.
Developer — 31st January 2012 #
Can you have a quick scan of your php error log for me if you have access to it - just in case there is anything in there related to automessage.
Also, if you can, let me know the contents of the wp_am_queue and wp_am_schedule tables in your DB (if you have multi-db enabled then they will be in the global db)
Member — 1st February 2012 #
Hi Barry,
I checked the error log and didn't see anything related to automessage in the latest 300 messages.
also, I can't seem to find the tables in the global db. Sorted alphabetically, the table names go directly from "wp_1_wpsc_variation_values_assoc" to "wp_batch_create_queue" with no wp_am tables anywhere in sight. I scanned through the other databases just in case I had the wrong database and I didn't see wp_am tables in any of the other databases, I also tried running "SELECT * FROM wp_am_queue;" against a couple of the databases, including global, but all I got returned was an error that the table doesn't exist.
I double checked that the plugin is still installed and it's still there.
Is it possible that the tables somehow got removed but the plugin isn't showing any errors or is it more likely that I'm just being a little dim and missed the tables entirely?
Developer — 2nd February 2012 #
That's a bit strange - ok - I'll double check the code and pop up another check to make sure that it's storing things correctly.
Are you able to edit and add messages ok? Are there any queued messages showing in the automessage list?
Member — 2nd February 2012 #
I don't know if we've tried to add any messages other than just the two and we are able to edit messages so the tables have to be somewhere, I must have just missed them somehow.
The message with the delay says it has 11 messages in the queue. I'm not sure if I'm able to see the individual messages or, if I can, how I would do so.
I'm going to look at the database again just to be sure that I wasn't looking in the wrong spot or looked right at the tables and didn't realize it.
Developer — 2nd February 2012 #
Ok, it seems to be storing the messages and the queues against it then - which means the data is in your system for the admin side of things, but is getting lost for the message sending part.
I'll follow that code through and see if I can work out why. Do you have it network activated, or just on the main site?
Member — 2nd February 2012 #
It's network activated, I just double checked.
Developer — 8th February 2012 #
@oncourseadmin - apologies for the long time between responses - I've been hunting through things and will be uploading an update, as soon as I finish the final little bit of testing, which should sort out this issue.
Member — 8th February 2012 #
Thank you Barry!
Developer — 14th February 2012 #
Plugin has been updated - please grab it and let me know if it helps
Member — 14th February 2012 #
Hi Barry,
We currently have over 300 sites on our network, so I just have a question to be sure that everything works smoothly.
If we activate the updated plugin and enter the messages, is there a way that the existing sites don't get the older messages but do get any new ones without removing and re-creating the 300 sites?
Developer — 14th February 2012 #
Yes, it's a bit of a hack but if you can access your database and look at the wp_blogs table, find the highest ID in that table and make a note of it.
Then, have a look in wp_options - you are looking for a record with an option_name of automessage_max_blog_ID. Set the option_value of that record to your maximum ID and the plugin will only look at blogs with an ID greater than that value (i.e. new ones).
Member — 14th February 2012 #
And we'll still be able to send new messages to the blogs that are already created?
Developer — 14th February 2012 #
Not sure what you mean here.
Member — 14th February 2012 #
We still want to be sending any new messages that we create to the sites that are already created but not send those sites messages that are currently entered.
So, for example, site a is already created and we don't want site a to receive messages that are already entered. We set up the plugin with the changes you just suggested. We create site z which starts getting messages. After site z receives all the messages in the series, we decide that we want to add a message to the series and we want both site a and site z to receive this message.
Will site a get the new message that we just entered or will it just skip site a and go right to site z?
If site a would not get the new message, would setting the automessage_max_blog_ID value back to its original value allow us to achieve this?
I hope that was a little clearer but it's entirely possible that I just made everything less clear.
If I'm just making less sense that I can test it and find out myself but I would prefer to not have to do that unless really I have to.
Developer — 14th February 2012 #
Automessage doesn't do that I'm afraid. A site is added to the automessage queue when it is created and works it's way through the existing messages until it reaches the last message in the queue. If there are no more messages in the queue after that last message is sent, it effectively drops off the end of the queue and is never sent a message by automessage again.
Member — 15th February 2012 #
Ok. Thanks for the explanation. I'll give the update a try.
Member — 16th February 2012 #
Ok, I've applied the update and checked the change to my database (automessage_max_blog_ID was already changed to the highest blog id, maybe the update did that?) I'll report back soon with the results.
Member — 17th February 2012 #
Looks like everything is working properly now.
Thanks Barry, you were a great help!
And thanks to Aaron for drawing attention to this!
Become a member