[XFA] Multiple Countdowns - XF2

[XFA] Multiple Countdowns - XF2 [Paid] 3.1.2

No permission to buy (€10.00)
  • XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'active' in 'field list'
  • src/XF/Db/AbstractStatement.php:212
  • Generated by: optimusprime338
  • Aug 6, 2018 at 3:32 AM
Stack trace
INSERT INTO `xfa_xcountdown` (`title`, `description`, `link`, `location`, `start_date`, `end_date`, `duration`, `countdown_id`, `parent_id`, `active`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(160): XF\Db\AbstractAdapter->query('INSERT INTO `x...', Array)
#5 src/XF/Mvc/Entity/Entity.php(1389): XF\Db\AbstractAdapter->insert('xfa_xcountdown', Array, false)
#6 src/XF/Mvc/Entity/Entity.php(1121): XF\Mvc\Entity\Entity->_saveToSource()
#7 src/addons/XFA/MultipleCountdowns/Service/Countdown/Creator.php(118): XF\Mvc\Entity\Entity->save()
#8 src/XF/Service/ValidateAndSavableTrait.php(40): XFA\MultipleCountdowns\Service\Countdown\Creator->_save()
#9 src/addons/XFA/MultipleCountdowns/Pub/Controller/Countdowns.php(80): XFA\MultipleCountdowns\Service\Countdown\Creator->save()
#10 src/XF/Mvc/Dispatcher.php(249): XFA\MultipleCountdowns\Pub\Controller\Countdowns->actionAdd(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XFA\\MultipleCou...', 'Add', 'json', Object(XF\Mvc\ParameterBag), '', Object(XFA\MultipleCountdowns\Pub\Controller\Countdowns), NULL)
#12 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(1891): XF\Mvc\Dispatcher->run()
#14 src/XF.php(328): XF\App->run()
#15 index.php(13): XF::runApp('XF\\Pub\\App')
#16 {main}
 
There is no reference to any active column in our code.
I don't get it.

You do run the 3.1.0 ?

Would it be possible to get an ftp access to your website + account with rights to create countdown ?
If so PM me (Mtor) on our website with the info.
 
Is it possible to have different countdown widgets? Wanna show different counters depending on the language settings (US v. UK vs DE).
 
No it's adding all countdowns which are configured to be in widget into the sidebar widget.
 
I could most certainly implement capability to add to more than one widget.
That's not straightforward though.

You can post your feature request on our forum.

Clément
 
Hi @XFA,

Running the latest version of your add on - 3.1.1. It's generating the following error many times in the error log, so we've needed to disable the add on:

  • XF\Db\Exception: Macro public:PAGE_CONTAINER :: header() error: MySQL statement prepare error [1054]: Unknown column 'xfa_xcountdown.end_date' in 'where clause'
  • src/XF/Db/AbstractStatement.php:212
  • Generated by: Unknown account
  • Jan 5, 2019 at 1:41 AM
Stack trace
SELECT xfa_xcountdown., xfa_xcountdown_Parent_1.
FROM xfa_xcountdown
LEFT JOIN xfa_xcountdown AS xfa_xcountdown_Parent_1 ON (`xfa_xcountdown_Parent_1`.`parent_id` = xfa_xcountdown.`parent_id`)
WHERE (`xfa_xcountdown`.`start_date` < 1546652497) AND (`xfa_xcountdown`.`end_date` > 1546652497) AND (`xfa_xcountdown`.`location` LIKE '%header%')
ORDER BY xfa_xcountdown.`end_date` ASC

------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Mvc/Entity/Finder.php(1163): XF\Db\AbstractAdapter->query('
SELECT `xfa...')
#5 src/addons/XFA/MultipleCountdowns/Template.php(18): XF\Mvc\Entity\Finder->fetch()
#6 [internal function]: XFA\MultipleCountdowns\Template::getHeaderCountdown('', Array, Object(SV\ContentRatings\XF\Template\Templater))
#7 src/XF/Template/Templater.php(1339): call_user_func(Array, '', Array, Object(SV\ContentRatings\XF\Template\Templater))
#8 internal_data/code_cache/templates/l1/s8/public/PAGE_CONTAINER.php(478): XF\Template\Templater->callback('XFA\\MultipleCou...', 'getHeaderCountd...', '', Array)
#9 src/XF/Template/Templater.php(663): XF\Template\Templater->{closure}(Object(SV\ContentRatings\XF\Template\Templater), Array, Array)
#10 internal_data/code_cache/templates/l1/s8/public/PAGE_CONTAINER.php(1143): XF\Template\Templater->callMacro('PAGE_CONTAINER', 'header', Array, Array)
#11 src/XF/Template/Templater.php(1250): XF\Template\Templater->{closure}(Object(SV\ContentRatings\XF\Template\Templater), Array)
#12 src/XF/Pub/App.php(462): XF\Template\Templater->renderTemplate('PAGE_CONTAINER', Array)
#13 src/XF/App.php(1769): XF\Pub\App->renderPageHtml('<div class="blo...', Array, Object(XF\Mvc\Reply\Message), Object(XF\Mvc\Renderer\Html))
#14 src/XF/Mvc/Dispatcher.php(310): XF\App->renderPage('<div class="blo...', Object(XF\Mvc\Reply\Message), Object(XF\Mvc\Renderer\Html))
#15 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\Message), 'html')
#16 src/XF/App.php(1934): XF\Mvc\Dispatcher->run()
#17 src/XF.php(333): XF\App->run()
#18 index.php(13): XF::runApp('XF\\Pub\\App')
#19 {main}
Request state
array(4) {
["url"] => string(39) "/misc/style?redirect=%2Fposts%2F5662%2F"
["referrer"] => bool(false)
["_GET"] => array(1) {
["redirect"] => string(12) "/posts/5662/"
}
["_POST"] => array(0) {
}
}

Would you please be able to advise what might be the issue here?

Thanks,
oman
 
Hi @XFA,

Running the latest version of your add on - 3.1.1. It's generating the following error many times in the error log, so we've needed to disable the add on:

  • XF\Db\Exception: Macro public:pAGE_CONTAINER :: header() error: MySQL statement prepare error [1054]: Unknown column 'xfa_xcountdown.end_date' in 'where clause'
  • src/XF/Db/AbstractStatement.php:212
  • Generated by: Unknown account
  • Jan 5, 2019 at 1:41 AM
Stack trace
SELECT xfa_xcountdown., xfa_xcountdown_Parent_1.
FROM xfa_xcountdown
LEFT JOIN xfa_xcountdown AS xfa_xcountdown_Parent_1 ON (`xfa_xcountdown_Parent_1`.`parent_id` = xfa_xcountdown.`parent_id`)
WHERE (`xfa_xcountdown`.`start_date` < 1546652497) AND (`xfa_xcountdown`.`end_date` > 1546652497) AND (`xfa_xcountdown`.`location` LIKE '%header%')
ORDER BY xfa_xcountdown.`end_date` ASC

------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Mvc/Entity/Finder.php(1163): XF\Db\AbstractAdapter->query('
SELECT `xfa...')
#5 src/addons/XFA/MultipleCountdowns/Template.php(18): XF\Mvc\Entity\Finder->fetch()
#6 [internal function]: XFA\MultipleCountdowns\Template::getHeaderCountdown('', Array, Object(SV\ContentRatings\XF\Template\Templater))
#7 src/XF/Template/Templater.php(1339): call_user_func(Array, '', Array, Object(SV\ContentRatings\XF\Template\Templater))
#8 internal_data/code_cache/templates/l1/s8/public/PAGE_CONTAINER.php(478): XF\Template\Templater->callback('XFA\\MultipleCou...', 'getHeaderCountd...', '', Array)
#9 src/XF/Template/Templater.php(663): XF\Template\Templater->{closure}(Object(SV\ContentRatings\XF\Template\Templater), Array, Array)
#10 internal_data/code_cache/templates/l1/s8/public/PAGE_CONTAINER.php(1143): XF\Template\Templater->callMacro('PAGE_CONTAINER', 'header', Array, Array)
#11 src/XF/Template/Templater.php(1250): XF\Template\Templater->{closure}(Object(SV\ContentRatings\XF\Template\Templater), Array)
#12 src/XF/Pub/App.php(462): XF\Template\Templater->renderTemplate('PAGE_CONTAINER', Array)
#13 src/XF/App.php(1769): XF\Pub\App->renderPageHtml('<div class="blo...', Array, Object(XF\Mvc\Reply\Message), Object(XF\Mvc\Renderer\Html))
#14 src/XF/Mvc/Dispatcher.php(310): XF\App->renderPage('<div class="blo...', Object(XF\Mvc\Reply\Message), Object(XF\Mvc\Renderer\Html))
#15 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\Message), 'html')
#16 src/XF/App.php(1934): XF\Mvc\Dispatcher->run()
#17 src/XF.php(333): XF\App->run()
#18 index.php(13): XF::runApp('XF\\Pub\\App')
#19 {main}
Request state
array(4) {
["url"] => string(39) "/misc/style?redirect=%2Fposts%2F5662%2F"
["referrer"] => bool(false)
["_GET"] => array(1) {
["redirect"] => string(12) "/posts/5662/"
}
["_POST"] => array(0) {
}
}

Would you please be able to advise what might be the issue here?

Thanks,
oman

Strange error, do you have a xfa_xcountdown table in your database ?
 
Hi xfa it is our board Oman is working on for us. I can confirm we are using xons content ratings add on. This error came up on installation though before anyone started using the system
 
Hi xfa it is our board Oman is working on for us. I can confirm we are using xons content ratings add on. This error came up on installation though before anyone started using the system

Yes but my question is when do you get that error exactly ?
 
He got it on installation, we never went live with the site and your addon turned on. For more information then that, I will leave it to @oman to respond
 
@XFA is it possible to cut off months if the count is NULL?
Screenshot 2020-02-02 19.00.27.png

I have also a suggestion. The link for manage countdowns is shown below the widget. This doesn't look really good. I set it as part of the visitor account. Maybe something for a new release.. ;)

Screenshot 2020-02-02 19.03.02.png

There're also missing phrases in xfa_form_macros [XFA] Core add-on.

Screenshot 2020-02-02 19.03.48.png

I found a styling issue in the manage countdowns view.

Screenshot 2020-02-02 19.10.29.webp
 
Last edited:
Top Bottom