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've noticed that the ads content that is crea.ted updates constantly. When I go to the content menu they are always on top. Maybe this has something to do with cron? Normally it's not an issue, only making it annoying to search for content because I have to scroll down all the time. However, when we have a few users posting, editing and such, this seems to cause unnecessary load. I don't believe it should be updating these all the time. Is there a way to make this not happen without hacking the code? Is anyone else getting this issue? Any help is much appreciated
Comment | File | Size | Author |
---|---|---|---|
#16 | cronfix-1853466-16.patch | 5.09 KB | mahaprasad |
#14 | cronfix-1853466-14.patch | 3.72 KB | mahaprasad |
#9 | 7.x-1.x-dev-fix-for-ad-update.patch | 1.54 KB | Bcwald |
issue_Simpleads_12-11-28.jpg | 424.38 KB | Ganginator |
Comments
Comment #1
minnur CreditAttribution: minnur commentedI can confirm this. Right now I don't have time to fix this, I will try get back to this when I have some capacity.
Comment #2
Ganginator CreditAttribution: Ganginator commentedIt's good to hear that it's not just me.
Is there anything I can do to help?
Comment #3
Bcwald CreditAttribution: Bcwald commentedI was just going to create an issue for this. It doesnt seem like a big deal, but on my magazine, we have many articles that go live each day, so its nice to see an accurate recent posting.
I will look into the code to see if I can figure anything out.
Comment #4
Bcwald CreditAttribution: Bcwald commentedAnyone have any idea what is causing this to be updated, i would love to get this fixed as its taking over the content management area.
Comment #5
Ganginator CreditAttribution: Ganginator commentedI'm pretty sure it's updating all simpleads content on every cron run, and that this is maybe because of it's tracking system updating clickthroughs.
Comment #6
mavdiablo CreditAttribution: mavdiablo commentedHi there,
you are right when you say that all simpleads content are updated on every cron run.
But not for tracking system, for status system.
I mean that every cron the script checks the start date and the end date of simpleads content and set the status to 0 if the simpleads is expired or 1 if simpleads is actived.
But I think it is useless to save the node if the state does not change.
So the site spares even a few seconds of the cron procedure.
Here what I mean:
File simpleads.helper.inc
Function _simpleads_activate_deactive_ad
I hope it will useful for you
Bye
Comment #7
Bcwald CreditAttribution: Bcwald commentedI tried out the solution in #6 and seems to work. When I ran cron, it did not update any of the items that didnt need updating, but when something expired, on next cron run, it shows up in the list.
Comment #8
mavdiablo CreditAttribution: mavdiablo commentedyes, that's right... because the node has been saved and I think it's good to see it updated as you realize that something has happened.
Is it not right for you?
Comment #9
Bcwald CreditAttribution: Bcwald commentedI have created a patch for this (based off the latest dev version)
Comment #11
mavdiablo CreditAttribution: mavdiablo commentedthanks :)
Comment #12
Ganginator CreditAttribution: Ganginator commentedI like that we're making progress!
I completely understand, and support simple ads updating after something expires, or is edited, and therefore appearing on the top of the content list.
That is perfect.
It just needs to not update all ads on every cron.
If the state does not change, do not update, if it has, update.
Comment #13
minnur CreditAttribution: minnur commentedHi there, I think I fixed the problem, please try development version of SimpleAds and report any problems here.
I would not recommend to install it on your production environment. Please use stage or local dev environment instead.
This release also contains fix for this http://drupal.org/node/1876732
Thanks
Comment #14
mahaprasad CreditAttribution: mahaprasad commentedIssue: On every cron run, all simpleads nodes are fetched from node table & in function _simpleads_activate_deactive_ad(), all these simpleads nodes are updated as per added ads date.
Now to solve this problem I have created queries to load only those simpleads nodes which are going to Activate or De-active based on the date added & updated these nodes.
Please review the attached patch.
Thank you!
Comment #16
mahaprasad CreditAttribution: mahaprasad commentedCorrected the uploaded patch in #14.
Please review.
Comment #17
mahaprasad CreditAttribution: mahaprasad commentedComment #19
Tran CreditAttribution: Tran commentedWhat's the status of this issue?
Comment #20
jenniferblair CreditAttribution: jenniferblair commentedI'm looking for a status update on this issue as well.
Comment #21
oo7_golden_1 CreditAttribution: oo7_golden_1 commentedI am interested in a status update as well... Love the module by the way.
Comment #22
VM CreditAttribution: VM commentedThe status based off of the dev's comment in #13 is that -dev should be tested. This remains true today as the date of the last release is earlier than the date of the comment.
Comment #23
minnur CreditAttribution: minnur as a volunteer commented