Error when trying to compile a component #76

Closed
opened 2017-05-04 10:05:08 +00:00 by nosfas · 5 comments
nosfas commented 2017-05-04 10:05:08 +00:00 (Migrated from github.com)

Installed JCB on 2 different Joomla sites, one with Joomla 3.7 and the other with the 3.6.5 version.
Built the component as best as I could understand by looking at the demo on each joomla site.
Tryed to compile on both, neither completed.
Getting the following error on both Joomla compilations:
0 DateTime::__construct(): Failed to parse time string (-001-11-30T00:00:00+00:00) at position 7 (-): Double timezone specification
The Demo compilation works, but not anything else.

Managed to enable the Joomla debug options and got the call stack:
Call stack

Function Location

1 DateTime->__construct() JROOT/libraries/joomla/date/date.php:118
2 JDate->__construct() JROOT/libraries/joomla/factory.php:530
3 JFactory::getDate() JROOT/administrator/components/com_componentbuilder/helpers/compiler/b_Structure.php:799
4 Structure->getLastModifiedDate() JROOT/administrator/components/com_componentbuilder/helpers/compiler/b_Structure.php:642
5 Structure->setDynamique() JROOT/administrator/components/com_componentbuilder/helpers/compiler/b_Structure.php:342
6 Structure->__construct() JROOT/administrator/components/com_componentbuilder/helpers/compiler/e_Interpretation.php:61
7 Interpretation->__construct() JROOT/administrator/components/com_componentbuilder/helpers/compiler/f_Infusion.php:46
8 Infusion->__construct() JROOT/administrator/components/com_componentbuilder/helpers/compiler.php:68
9 Compiler->__construct() JROOT/administrator/components/com_componentbuilder/models/compiler.php:176
10 ComponentbuilderModelCompiler->builder() JROOT/administrator/components/com_componentbuilder/controllers/compiler.php:79
11 ComponentbuilderControllerCompiler->compiler() JROOT/libraries/legacy/controller/legacy.php:709
12 JControllerLegacy->execute() JROOT/administrator/components/com_componentbuilder/componentbuilder.php:59
13 require_once() JROOT/libraries/cms/component/helper.php:394
14 JComponentHelper::executeComponent() JROOT/libraries/cms/component/helper.php:369
15 JComponentHelper::renderComponent() JROOT/libraries/cms/application/administrator.php:98
16 JApplicationAdministrator->dispatch() JROOT/libraries/cms/application/administrator.php:156
17 JApplicationAdministrator->doExecute() JROOT/libraries/cms/application/cms.php:265
18 JApplicationCms->execute() JROOT/administrator/index.php:51

Installed JCB on 2 different Joomla sites, one with Joomla 3.7 and the other with the 3.6.5 version. Built the component as best as I could understand by looking at the demo on each joomla site. Tryed to compile on both, neither completed. Getting the following error on both Joomla compilations: 0 DateTime::__construct(): Failed to parse time string (-001-11-30T00:00:00+00:00) at position 7 (-): Double timezone specification The Demo compilation works, but not anything else. Managed to enable the Joomla debug options and got the call stack: Call stack # Function Location 1 DateTime->__construct() JROOT/libraries/joomla/date/date.php:118 2 JDate->__construct() JROOT/libraries/joomla/factory.php:530 3 JFactory::getDate() JROOT/administrator/components/com_componentbuilder/helpers/compiler/b_Structure.php:799 4 Structure->getLastModifiedDate() JROOT/administrator/components/com_componentbuilder/helpers/compiler/b_Structure.php:642 5 Structure->setDynamique() JROOT/administrator/components/com_componentbuilder/helpers/compiler/b_Structure.php:342 6 Structure->__construct() JROOT/administrator/components/com_componentbuilder/helpers/compiler/e_Interpretation.php:61 7 Interpretation->__construct() JROOT/administrator/components/com_componentbuilder/helpers/compiler/f_Infusion.php:46 8 Infusion->__construct() JROOT/administrator/components/com_componentbuilder/helpers/compiler.php:68 9 Compiler->__construct() JROOT/administrator/components/com_componentbuilder/models/compiler.php:176 10 ComponentbuilderModelCompiler->builder() JROOT/administrator/components/com_componentbuilder/controllers/compiler.php:79 11 ComponentbuilderControllerCompiler->compiler() JROOT/libraries/legacy/controller/legacy.php:709 12 JControllerLegacy->execute() JROOT/administrator/components/com_componentbuilder/componentbuilder.php:59 13 require_once() JROOT/libraries/cms/component/helper.php:394 14 JComponentHelper::executeComponent() JROOT/libraries/cms/component/helper.php:369 15 JComponentHelper::renderComponent() JROOT/libraries/cms/application/administrator.php:98 16 JApplicationAdministrator->dispatch() JROOT/libraries/cms/application/administrator.php:156 17 JApplicationAdministrator->doExecute() JROOT/libraries/cms/application/cms.php:265 18 JApplicationCms->execute() JROOT/administrator/index.php:51
nosfas commented 2017-05-04 11:01:41 +00:00 (Migrated from github.com)

Update:
Aparently there's a bug somewhere when setting the value for the field "modified" on the JCB tables.
Noticed the function getLastModifiedDate() and then found out what it did.
Looked for the modified date value in the tables, and found that every record created when creating my component, had the "created" filled and the "modified" with the default value "0000-00-00 00:00:00".
Updated the modified date with the value in the creating field for every record related to my component.
The compiled worked this time.

Any thoughts?

Update: Aparently there's a bug somewhere when setting the value for the field "modified" on the JCB tables. Noticed the function getLastModifiedDate() and then found out what it did. Looked for the modified date value in the tables, and found that every record created when creating my component, had the "created" filled and the "modified" with the default value "0000-00-00 00:00:00". Updated the modified date with the value in the creating field for every record related to my component. The compiled worked this time. Any thoughts?

We resolved this bug in issue gh-39 but I will have a look at it again.

We resolved this bug in issue gh-39 but I will have a look at it again.

@nosfas can you download this stage version and check if the problem is resolved when faced with the same values that caused the error/bug in the first place.

@nosfas can you download [this stage version](https://github.com/vdm-io/Joomla-Component-Builder/archive/4cead46ac4b564ee5a3a4800a97dba0b6d03c3fc.zip) and check if the problem is resolved when faced with the same values that caused the error/bug in the first place.
nosfas commented 2017-05-04 23:10:15 +00:00 (Migrated from github.com)

Sure, not at the work atm.
Tomorrow I'll try.
Thank you.

Sure, not at the work atm. Tomorrow I'll try. Thank you.
nosfas commented 2017-05-05 08:34:53 +00:00 (Migrated from github.com)

Seems to be working fine now.
Thank you.

Seems to be working fine now. Thank you.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: joomla/Component-Builder#76