CTA Featured Threads & Portal

CTA Featured Threads & Portal [Paid] 2.17.0

No permission to buy (£40.00)
Getting another error with this as well, being that I have guest posting enabled that is moderated. Upon going to check the guest posts newly created thread and trying to approve it, I then get the below error which stops me doing anything on the frontend with that content.

Code:
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Duplicate entry '48263' for key 'PRIMARY' - library/Zend/Db/Statement/Mysqli.php:214
Generated By: anthony, A moment ago
Stack Trace
#0 /home/ptsdforu/public_html/c/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/ptsdforu/public_html/c/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/ptsdforu/public_html/c/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `ct...', Array)
#3 /home/ptsdforu/public_html/c/library/XenForo/DataWriter.php(1624): Zend_Db_Adapter_Abstract->insert('cta_ft_featured...', Array)
#4 /home/ptsdforu/public_html/c/library/XenForo/DataWriter.php(1613): XenForo_DataWriter->_insert()
#5 /home/ptsdforu/public_html/c/library/XenForo/DataWriter.php(1405): XenForo_DataWriter->_save()
#6 /home/ptsdforu/public_html/c/library/CTA/FeaturedThreads/DataWriter/Discussion/Thread.php(150): XenForo_DataWriter->save()
#7 /home/ptsdforu/public_html/c/library/CTA/FeaturedThreads/DataWriter/Discussion/Thread.php(31): CTA_FeaturedThreads_DataWriter_Discussion_Thread->_automaticallyFeatureThread()
#8 /home/ptsdforu/public_html/c/library/XenForo/DataWriter/Discussion.php(453): CTA_FeaturedThreads_DataWriter_Discussion_Thread->_discussionPostSave()
#9 /home/ptsdforu/public_html/c/library/XenForo/DataWriter.php(1409): XenForo_DataWriter_Discussion->_postSave()
#10 /home/ptsdforu/public_html/c/library/XenForo/ModerationQueueHandler/Thread.php(76): XenForo_DataWriter->save()
#11 /home/ptsdforu/public_html/c/library/XenForo/Model/ModerationQueue.php(200): XenForo_ModerationQueueHandler_Thread->approveModerationQueueEntry(48263, 'Is it possible ...', 'Ptsd On Top Of ...')
#12 /home/ptsdforu/public_html/c/library/UserEss/Model/ModerationQueue.php(56): XenForo_Model_ModerationQueue->saveModerationQueueChanges(Array, NULL)
#13 /home/ptsdforu/public_html/c/library/XenForo/ControllerPublic/ModerationQueue.php(74): UserEss_Model_ModerationQueue->saveModerationQueueChanges(Array)
#14 /home/ptsdforu/public_html/c/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_ModerationQueue->actionSave()
#15 /home/ptsdforu/public_html/c/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#16 /home/ptsdforu/public_html/c/index.php(13): XenForo_FrontController->run()
#17 {main}
Request State
array(3) {
  ["url"] => string(46) "https://www.myptsd.com/c/moderation-queue/save"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(2) {
    ["queue"] => array(2) {
      ["thread"] => array(1) {
        [48263] => array(3) {
          ["title"] => string(19) "Ptsd On Top Of Ptsd"
          ["message"] => string(74) "Is it possible to have a trauma after combat that triggers your past PTSD?"
          ["action"] => string(7) "approve"
        }
      }
      ["post"] => array(2) {
        [769085] => array(2) {
          ["message"] => string(721) "[QUOTE="purpleiris, post: 717779, member: 26947"]I've decided to do it. I am in the waiting room now at Timberlawn waiting to be evaluated. It was terrifying filling out the paperwork, I was shaking. But I believe this trauma program is what I need to begin to heal. I will post on here after I leave to let you all know how it was/what it was like.[/QUOTE]

I have a loved one who just checked into Timberlawn's trauma program yesterday (10/21/14). Would you be comfortable sharing your experiences? I've seen both positive and negative reviews -- and I'm a little nervous about her wellbeing. And kudos for you for getting help -- I can only imagine how scary it must have been. I hope today finds you well and happy."
          ["action"] => string(0) ""
        }
        [769090] => array(2) {
          ["message"] => string(509) "Hi
I've been reading about the way the amygdala and other parts of the brain are involved with the startle response, and how it is a physical reaction to perceived threat. I wonder if anyone has tried mindfulness and self-compassion, there is a lot of research out there that shows it can reduce the reactivity of the threat system. A good starting point could be authors at google: rick hanson on youtube, He has a talk that explains how the neuroscience works in meditation.
Hope that helps.
Best wishes."
          ["action"] => string(0) ""
        }
      }
    }
    ["_xfToken"] => string(8) "********"
  }
}
 
I have just tested that and don't get any errors.

The guest post is submitted and enters the moderation queue.

Once approved it is automatically featured.

Try disabling other add-ons and test again.
 
Is it currently showing as featured even though it is moderated?

I am unable to reproduce the issue on my local installation.
Automatic featuring works in all cases - for registered members and guests, all threads or using criteria.

I suspect the problem has arisen due to a conflict with another add-on and now there is a possible discrepancy in the database.

If you provide phpMyAdmin and moderator access and a link to the thread, I can take a look.
 
Why is it when I do some tasks, I end up with old threads with old creation dates, on the homepage instead of the actual latest threads by date, which is how I have CTA setup?

Right now, just one example, I am running the archiver cron which locks old threads when the last post was two years ago. As a result of those threads getting locked, every one of them is bumped onto the homepage as though the CTA settings are just ignored about only showing the most recent thread creation data.

This has happened to me several times where I've done tasks on older content, and suddenly they're on the homepage as though the thread creation date had changed or something, but it hasn't, as it still shows the existing date... but CTA is ignoring that date.
 
Ok... I made some adjustments in automatic featuring to not use all threads... which I assumed was using the thread creation date only, and instead checked for only threads posted in the last x days... see if that works!

Assumption is the mother of all F-Ups, they say!
 
Are you positive these settings work? Honestly?

Screen Shot 2014-10-24 at 2.31.28 pm.webp

These were the changes I made to automatic featuring, and I just posted a new thread in my social forum... didn't list on the homepage.
 
Last edited:
I'm now positive your settings aren't working as I have them above, as I changed criteria back to all threads, new threads start showing up on the homepage again.

The problem with this setting though, is as the archiver locks old threads, it shows all of them on the homepage too... even though they're years old from the thread creation date.

I know you say moved threads and such show up... but really... locking an old thread features it? This really screws with a sites homepage the way this works Brogan!!!
 
Those criteria do work. I know this, I tested them thoroughly in beta and I am using them now, albeit with different settings, and they still work as intended.

What is this archiver cron? Sounds like it's from an add-on. I'm guessing that, when locking/archiving a thread it's somehow marking it as being recently posted in and that would be why the threads are then being featured.
 
These were the changes I made to automatic featuring, and I just posted a new thread in my social forum... didn't list on the homepage.
The cron task needs to run first.
It runs once an hour at 25 minutes past.

I know you say moved threads and such show up... but really... locking an old thread features it? This really screws with a sites homepage the way this works Brogan!!!
There's really no need for all of the exclamation marks!!!
You could simply report the fact and then I would respond.

I can probably tweak the code to stop threads which are locked and unlocked from being automatically featured.

Other than that, yes, everything works exactly as designed.
 
Mate... just frustrated with things, not frustrated with you.... !!! are just in.

Thanks for the above insight. Why do they instantly feature when selected as all threads, versus need a cron to run every hour when selected to post within 72hrs of thread creation?
 
The all threads function features as the thread is created.
It is done when the thread is inserted into the database.

The criteria is done via cron - that is the only way of periodically checking whether threads meet the criteria.
Once an hour is probably quite low (in hindsight) so I may increase it to several times an hour.
 
Top Bottom