Competitions for XenForo [Deleted]

@Chris D is there any plans to change how participants can enter the competition? Like members with minimum 1000 posts? Or at least 500 likes? etc...
that in addition to the groups of course :)
 
Be nice if we could see the number of entrants. It would let me know what competitions are more/less popular.
 
Hey Chriss First ever troubles with your add-on. Probably not with the add-on but with all that happened around it. I had a server burn up during a OS upgrade. Yes it literately burned. Something with the raid controller. Anyway, I had to rebuild my site. I had the complete database so figured all was good.

Unfortunately I am getting errors. When I click on the archive link I get an error page.

Code:
ErrorException: Undefined offset: 3394 - library/AVForums/Competitions/Model/Competition.php:557
Generated By: Jump, 4 minutes ago
Stack Trace

#0 /home/mysite/public_html/library/AVForums/Competitions/Model/Competition.php(557): XenForo_Application::handlePhpError(8, 'Undefined offse...', '/home/mysite...', 557, Array)
#1 /home/mysite/public_html/library/AVForums/Competitions/Model/Competition.php(635): AVForums_Competitions_Model_Competition->prepareCompetition(Array, Array)
#2 /home/mysite/public_html/library/AVForums/Competitions/ControllerPublic/Competition.php(117): AVForums_Competitions_Model_Competition->prepareCompetitions(Array, true)
#3 /home/mysite/public_html/library/XenForo/FrontController.php(347): AVForums_Competitions_ControllerPublic_Competition->actionArchive()
#4 /home/mysite/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#5 /home/mysite/public_html/index.php(13): XenForo_FrontController->run()
#6 {main}

Request State

array(3) {
  ["url"] => string(44) "http://mysite.com/contests/archive"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}


And when I click on a thread link for an old Competition I get this.

Code:
ErrorException: Undefined offset: 618 - library/AVForums/Competitions/Model/Competition.php:557
Generated By: Unknown Account, 23 minutes ago
Stack Trace

#0 /home/mysite/public_html/library/AVForums/Competitions/Model/Competition.php(557): XenForo_Application::handlePhpError(8, 'Undefined offse...', '/home/mysite...', 557, Array)
#1 /home/mysite/public_html/library/AVForums/Competitions/ControllerPublic/Thread.php(24): AVForums_Competitions_Model_Competition->prepareCompetition(Array)
#2 /home/mysite/public_html/library/Andy/SimilarThreads/ControllerPublic/Thread.php(12): AVForums_Competitions_ControllerPublic_Thread->actionIndex()
#3 /home/mysite/public_html/library/XenForo/FrontController.php(347): Andy_SimilarThreads_ControllerPublic_Thread->actionIndex()
#4 /home/mysite/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#5 /home/mysite/public_html/index.php(13): XenForo_FrontController->run()
#6 {main}

Request State

array(3) {
  ["url"] => string(89) "http://mysite.com/threads/win-a-free-hull-skin-for-your-star-citizen-ship.6097/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
Certainly there shouldn't be any possibility of getting errors there in "normal" conditions.

Specifically it's falling over because the competition has a thumbnail, but for some reason that attachment isn't available.

Do you have any problems with your attachments?

If this only affects a small number of competitions, it might be possible to set the thumbnail attachment ID to 0 in the database and re-upload the thumbnails.
 
If I turn off Competitions people can't register. It throws this error.

Code:
Server Error

Mysqli statement execute error : Field 'competition_entries' doesn't have a default value

Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 317
Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1624
XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1613
XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1405
XenForo_DataWriter->save() in MetaMirror/DataWriter/User.php at line 8
MetaMirror_DataWriter_User->save() in XenForo/ControllerPublic/Register.php at line 416
XenForo_ControllerPublic_Register->actionRegister() in sonnbStopSpamHere/ControllerPublic/Register.php at line 237
sonnbStopSpamHere_ControllerPublic_Register->actionRegister() in XenForo/FrontController.php at line 347
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /home/mysite/public_html/index.php at line 13
 
Yeah, there is a fix in the installer so not sure at first glance why that didn't happen.

Anyway, the fix is this:
Code:
ALTER TABLE xf_user CHANGE COLUMN competition_entries competition_entries BLOB NULL
 
I installed 1.2.0 fresh on my site when I reinstalled everything so maybe it's something in the install and not update. I looked in my backup sql from before (1.0.7 I believe) and it was set to null there.
 
Ah, possibly, I didn't look at it in detail but I will do so for the next release. For now, that's the query so should sort it out :)
 
In what way?

Pushover already pushes any alerts sent through XenForo. You just have to make sure the content type is enabled in the Admin CP, and you also need to ensure, as a user, your settings allow those alerts to be pushed.
 
Top Bottom