Buy Now
Sign in

Fatal error: Cannot redeclare class GCore\Models

cornelio , June 29 2017
C
cornelio
Hi,
i tried to reinstall ccv5 and cfv5 but i did not get any results.

I continue to get the error below.
Fatal error: Cannot redeclare class GCore\Models\formati in /home/ieraora/public_html/demophoto/administrator/components/com_chronoforms5/chronoforms/actions/db_save/db_save.php(73) : eval()'d code on line 4


Thanks in advance
Cornelio
GreyHead
Hi Cornelio,

Please check that you have the latest releases installed. I recall this as a bug that has been fixed. I checked the code I have on my test site and it looks as if it should prevent this error.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
C
cornelio
Hi bob,
Thanks for the quick answer.

I had already encountered and solved this bug.
The version is cfv5 5.0.14

Cornelio
GreyHead
Hi Cornelio,

I'm sorry but I'm not clear if this is still a problem or is now solved?

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
C
cornelio
Hi Bob,
Unfortunately it has not been solved, it's strange because it worked fine.

Cornelio
GreyHead
Hi Cornelio,

Please ask Max for an update - use the Contact Us menu above and link to this thread.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
admin
Hi,

Please make sure that you have unique models names in the forms and connections when you have them loaded on the same page, so if you have a model named "formati" some where then please use a different name in other "db" actions and in your connection.

Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
C
cornelio
Hi Max,
Thank you very much for the quick response.

Changing the name to the model seems to work, but now I do not remember how to fix this query as per attachment

Cornelio
Attachments
debug-query.PNG
debug-query.PNG
(21.17 KiB)
177 Downloads/Views
admin
Hi Cornelio,

You will need to unset these keys using PHP before the data is saved

unset($this->data["mformati"]["id"]);
unset($this->data["mformati"]["__N__"]);


Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
C
cornelio
Hi Max,
following your suggestion I did not get any change.

Thanks anyway

Cornelio
admin
Hi Cornelio,

It depends on where you have placed the code ?

Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
C
cornelio
Hi Bob,
sorry for late reply,
but from your previous answer I understand this way: see below
Attachments
config-setup.PNG
config-setup.PNG
(24.68 KiB)
170 Downloads/Views
admin
Hi Cornelio,

Sorry for the late reply!

Please try to add a debugger after the custom code, what do you get ?

Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
C
cornelio
Hi Max,

Thank you for the reply. These are my configurations

Regards
Cornelio
Attachments
start-form.PNG
start-form.PNG
(94.81 KiB)
147 Downloads/Views
debugger1.PNG
debugger1.PNG
(34.1 KiB)
142 Downloads/Views
debugger2.PNG
debugger2.PNG
(27.9 KiB)
141 Downloads/Views
setup.PNG
setup.PNG
(21.01 KiB)
136 Downloads/Views
admin
Hi Cornelio,

In the code you have "mformati" but it should be "formati" as in the data array to work.

Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
C
cornelio
Hi Max,
Yes you are right. I have corrected and as you see it does not change anything.

Regards
Cornelio
admin
Hi Cornelio,

You still get the same debug output ?

Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
C
cornelio
Hi Max,

The situation is always the same, included debug output
When you update the records you get the conditionality that I have exposed to you.

Regards
Cornelio