Calendar 1.0.5 rsvp_attendee_limit' in 'field list'

I got this error when trying to create a event

Mysqli prepare error: Unknown column 'rsvp_attendee_limit' in 'field list'

array(3) {
["url"] => string(32) "https://website.com/events/0/save"
["_GET"] => array(0) {
}
["_POST"] => array(18) {
["event_title"] => string(24) "Internationale Kattendag"
["start_date"] => string(10) "2018-08-08"
["start_time"] => string(5) "00:00"
["end_date"] => string(10) "2018-08-08"
["end_time"] => string(5) "01:00"
["all_day"] => string(2) "on"
["is_recurring"] => string(2) "on"
["recurring_options"] => array(3) {
["interval"] => string(1) "1"
["unit"] => string(5) "years"
["end_type"] => string(5) "never"
}
["description_html"] => string(3) "bla bla bla"
["_xfRelativeResolver"] => string(29) "https://website.com/events/add"
["event_location"] => string(0) ""
["event_timezone"] => string(16) "Europe/Amsterdam"
["attachment_hash"] => string(32) "907c3001ea125a64c239d230b9fa36d9"
["calendar_id"] => string(1) "4"
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(11) "/events/add"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
 
Run this:
Code:
ALTER TABLE xf_nf_calendar_event ADD COLUMN rsvp_attendee_limit INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER request_rsvp

Do you use the add-on installer from Chris?
 
This what is get when i created a new event

Mysqli prepare error: Unknown column 'rsvp_attendee_limit' in 'field list'
  1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
  2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
  3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
  4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
  5. Zend_Db_Adapter_Abstract->insert() in XenForo/DataWriter.php at line 1638
  6. XenForo_DataWriter->_insert() in XenForo/DataWriter.php at line 1627
  7. XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1419
  8. XenForo_DataWriter->save() in NixFifty/Calendar/ControllerPublic/Event.php at line 637
  9. NixFifty_Calendar_ControllerPublic_Event->actionSave() in XenForo/FrontController.php at line 369
  10. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 152
  11. XenForo_FrontController->run() in /home/public/sites/www.website.com/index.php at line 13
 
Perfect, glad to hear it.

I would really recommend using add-on installer in future, as it prevents issues like this. Newer versions of PHP come with an OPcache built in. Essentially, it caches PHP files so that they're quicker to run next time they're called. This is great but in some setups, the OPcache is too aggressive and still has cached versions of old files even when new ones have replaced them. In this case, the installer for 1.0.4 is cached but you're trying to install 1.0.5 so when you upload the XML, the 1.0.4 installer is fetched from cache and used rather than the 1.0.5 one. Thus, you get issues like this.

This can be worked around by clearing the OPcache beforehand but XenForo 1 does not do this (XenForo 2 does, so it's not a big deal there). The add-on installer will therefore clear the OPcache before upgrading an add-on, thus mitigating these kinds of errors.
 
Back
Top