Phrixos
  Phrixos
Silver Member
  Thursday, 18 August 2022
  14 Replies
  1.1K Visits
0
Votes
Undo
If you add a event bevor 1902 you get a SQL-Errorstatment!
An error has occurred.

0 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''1864-11-01 20:00:00','1864-11-01 23:59:59','05309848b13f4708ac7eaecc2eec817e')' at line 2

We also manage historical events!
2 years ago
·
#227469
0
Votes
Undo
What version of MySQL or MariaDB do you have?

We use DATETIME as our storage format and that should allow a very wide range of dates (https://dev.mysql.com/doc/refman/5.7/en/datetime.html)

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

2 years ago
·
#227471
0
Votes
Undo
I've managed to recreate the problem and the issue is with out of date integer fields for the unix timestamp equivalent of the date field.

This version of JEvents should resolve it

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

2 years ago
·
#227500
0
Votes
Undo
Your Attachmend installed

Bad new news:

New Error:
PROBLEMS_STORING_EVENT<br>There were problems saving the event detailProblem saving event Exception: Problem saving event Out of range value for column 'dtstart' at row 1 in /home/www/test/components/com_jevents/libraries/iCalEventDetail.php:296 Stack trace: #0 /home/www/test/components/com_jevents/libraries/iCalEvent.php(295): iCalEventDetail->store(false) #1 /home/www/test/administrator/components/com_jevents/libraries/saveIcalEvent.php(231): iCalEvent->store() #2 /home/www/test/administrator/components/com_jevents/controllers/icalevent.php(952): SaveIcalEvent::save(Array, Object(JEventsDBModel), Array) #3 /home/www/test/administrator/components/com_jevents/controllers/icalevent.php(737): AdminIcaleventController->doSave('') #4 /home/www/test/libraries/src/MVC/Controller/BaseController.php(735): AdminIcaleventController->save() #5 /home/www/test/administrator/components/com_jevents/jevents.php(268): Joomla\CMS\MVC\Controller\BaseController->execute('save') #6 /home/www/test/libraries/src/Dispatcher/LegacyComponentDispatcher.php(69): require_once('/home/www/test/...') #7 /home/www/test/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}('/home/www/test/...') #8 /home/www/test/libraries/src/Component/ComponentHelper.php(389): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() #9 /home/www/test/libraries/src/Application/AdministratorApplication.php(143): Joomla\CMS\Component\ComponentHelper::renderComponent('com_jevents') #10 /home/www/test/libraries/src/Application/AdministratorApplication.php(186): Joomla\CMS\Application\AdministratorApplication->dispatch() #11 /home/www/test/libraries/src/Application/CMSApplication.php(278): Joomla\CMS\Application\AdministratorApplication->doExecute() #12 /home/www/test/administrator/includes/app.php(63): Joomla\CMS\Application\CMSApplication->execute() #13 /home/www/test/administrator/index.php(32): require_once('/home/www/test/...') #14 {main}

Additional informations:
Database Type mysql
Database Version 5.7.38

Joomla! Version Joomla! 4.1.5 Stable [ Kuamini ] 21-June-2022 14:00 GMT
2 years ago
·
#227505
0
Votes
Undo
The file components/com_jevents/libraries/iCalEventDetail.php was changed to include this code

if ($this->dtstart < 0 || $this->dtend < 0)
{
$sql = "SHOW COLUMNS FROM #__jevents_vevdetail";
$db = Factory::getDbo();
$db->setQuery($sql);
$cols = @$db->loadObjectList("Field");

if (array_key_exists("dtstart", $cols) && strtolower($cols["dtstart"]->Type) == "int")
{
$sql = "ALTER TABLE #__jevents_vevdetail modify dtstart bigint NOT NULL";
$db->setQuery($sql);
@$db->execute();

$sql = "ALTER TABLE #__jevents_vevdetail modify dtend bigint NOT NULL";
$db->setQuery($sql);
@$db->execute();
}

}
between lines 271-289 - this should have changed the database column for dtstart to allow large negative numbers.

Do you have phpMyAdmin? Can you check the definitions of these 2 columns to see if they have been changed to 'bigint' ?

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

2 years ago
·
#227508
0
Votes
Undo
php Myadmin Says:


#__jevents_vevdetail

dtsstart int(11)
dtend int(11)
2 years ago
·
#227509
0
Votes
Undo
I can set both to bigint by phpMyadmin.
dose that solve the Problem?
2 years ago
·
#227510
0
Votes
Undo
I changed in phpMyadmin
dtsstart int(11)
dtend int(11)

to
dtsstart bigint(11)
dtend bigint(11)

no effect
2 years ago
·
#227512
0
Votes
Undo
bigint(11) is no use - it needs to be an unconstrained bigint though bigint(20) may work.

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

2 years ago
·
#227515
0
Votes
Undo
An error has occurred.

321 PROBLEMS_STORING_EVENT<br>There were problems saving the event detailProblem saving event Exception: Problem saving event Out of range value for column 'dtstart' at row 1 in /home/www/test/components/com_jevents/libraries/iCalEventDetail.php:296 Stack trace: #0 /home/www/test/components/com_jevents/libraries/iCalEvent.php(295): iCalEventDetail->store(false) #1 /home/www/test/administrator/components/com_jevents/libraries/saveIcalEvent.php(231): iCalEvent->store() #2 /home/www/test/administrator/components/com_jevents/controllers/icalevent.php(952): SaveIcalEvent::save(Array, Object(JEventsDBModel), Array) #3 /home/www/test/administrator/components/com_jevents/controllers/icalevent.php(1060): AdminIcaleventController->doSave('') #4 /home/www/test/libraries/src/MVC/Controller/BaseController.php(735): AdminIcaleventController->apply() #5 /home/www/test/administrator/components/com_jevents/jevents.php(268): Joomla\CMS\MVC\Controller\BaseController->execute('apply') #6 /home/www/test/libraries/src/Dispatcher/LegacyComponentDispatcher.php(69): require_once('/home/www/test/...') #7 /home/www/test/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}('/home/www/test/...') #8 /home/www/test/libraries/src/Component/ComponentHelper.php(389): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() #9 /home/www/test/libraries/src/Application/AdministratorApplication.php(143): Joomla\CMS\Component\ComponentHelper::renderComponent('com_jevents') #10 /home/www/test/libraries/src/Application/AdministratorApplication.php(186): Joomla\CMS\Application\AdministratorApplication->dispatch() #11 /home/www/test/libraries/src/Application/CMSApplication.php(278): Joomla\CMS\Application\AdministratorApplication->doExecute() #12 /home/www/test/administrator/includes/app.php(63): Joomla\CMS\Application\CMSApplication->execute() #13 /home/www/test/administrator/index.php(32): require_once('/home/www/test/...') #14 {main}
2 years ago
·
#227516
0
Votes
Undo
That is most strange - the attached version will tell us the value of dtstart that is causing the problem.

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

2 years ago
·
#227517
0
Votes
Undo
I installed the update again. Still same erreor:

An error has occurred.

321 PROBLEMS_STORING_EVENT<br>There were problems saving the event detailProblem saving event Exception: Problem saving event (-3318641608) : Out of range value for column 'dtstart' at row 1 in /home/www/test/components/com_jevents/libraries/iCalEventDetail.php:296 Stack trace: #0 /home/www/test/components/com_jevents/libraries/iCalEvent.php(295): iCalEventDetail->store(false) #1 /home/www/test/administrator/components/com_jevents/libraries/saveIcalEvent.php(231): iCalEvent->store() #2 /home/www/test/administrator/components/com_jevents/controllers/icalevent.php(952): SaveIcalEvent::save(Array, Object(JEventsDBModel), Array) #3 /home/www/test/administrator/components/com_jevents/controllers/icalevent.php(737): AdminIcaleventController->doSave('') #4 /home/www/test/libraries/src/MVC/Controller/BaseController.php(735): AdminIcaleventController->save() #5 /home/www/test/administrator/components/com_jevents/jevents.php(268): Joomla\CMS\MVC\Controller\BaseController->execute('save') #6 /home/www/test/libraries/src/Dispatcher/LegacyComponentDispatcher.php(69): require_once('/home/www/test/...') #7 /home/www/test/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}('/home/www/test/...') #8 /home/www/test/libraries/src/Component/ComponentHelper.php(389): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() #9 /home/www/test/libraries/src/Application/AdministratorApplication.php(143): Joomla\CMS\Component\ComponentHelper::renderComponent('com_jevents') #10 /home/www/test/libraries/src/Application/AdministratorApplication.php(186): Joomla\CMS\Application\AdministratorApplication->dispatch() #11 /home/www/test/libraries/src/Application/CMSApplication.php(278): Joomla\CMS\Application\AdministratorApplication->doExecute() #12 /home/www/test/administrator/includes/app.php(63): Joomla\CMS\Application\CMSApplication->execute() #13 /home/www/test/administrator/index.php(32): require_once('/home/www/test/...') #14 {main}
2 years ago
·
#227523
0
Votes
Undo
According to https://dev.mysql.com/doc/refman/8.0/en/integer-types.html a bigint field should hold values between +/- 9.2 x 10^18 i.e. integers up to 18 digits long. There should be no problems storing a dtstart value of -3318641608 in a bigint column can you check what the database says is the definition of these 2 columns. I suspect they may not be full bigint columns

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

2 years ago
·
#227533
0
Votes
Undo
But i'm not shure that its a Problem of the database. Becaus using Jomla 3.1 i had same databas-system and no problem i Checked there it is at least a int(11) field. So it can not caused by them. Its a Problem of Joma 4 and the new Version of Jevent for 4.
2 years ago
·
#227554
0
Votes
Undo
I was able to recreate the problem initially in Joomla 4 and once I'd updated the field type to bigint the problem was resolved.

The error message you are seeing is being thrown by MySQL not Joomla - see https://dev.mysql.com/doc/refman/5.7/en/out-of-range-and-overflow.html

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

  • Page :
  • 1
There are no replies made for this post yet.