Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

Forum

Visforms Subscription user can ask questions in our forum. Please log in with the relevant user first.
Everybody can access the forum for reading.

Please only ask 1 question per topic.

Important information for almost every question:
V1: Which Visforms version is running?
V2: Which Joomla version is running?
V3: Which PHP version is running?

Error: 1054 - Unknown column 'editonlyfield'

More
8 years 4 months ago - 8 years 4 months ago #3228 by sychiong
Hi,

Recently I've installed Visforms for Joomla! 3.x up to 3.5 version on a Joomla! 3.0.2 version.

Then I updated Joomla! to Joomla! 3.5.1 Stable [ Unicorn ] and Visforms to Version 3.7.7.

Now, whenever I have published a form from Visform, this error appears on the normal error page from my template:

Error: 1054 - Unknown column 'editonlyfield' in 'where clause' SQL=SELECT * FROM #__visfields where fid=2 and published=1 AND NOT (editonlyfield = 1) order by ordering asc


You can see this error live: mccustoms.cl/index.php/contacto

What could it be? How can I fix it?
Last edit: 8 years 4 months ago by sychiong.

More
8 years 4 months ago #3230 by Administrator AV
Replied by Administrator AV on topic Error: 1054 - Unknown column 'editonlyfield'
Hi,

in Visforms 3.7.1 I added 4 new fields to the table #_visfields. (editonlyfield, addtoredirecturl, includeinresultmail, includeinreceiptmail)
When you update Visforms, the update script should handle these database changes and create the new fields.
Maybe for some reason, there was an error during the update.

The Update also writes a log file (which purpose is to find exactly such problems which might happen during the installation or an update). This log file - visforms_update.php is located in the log folder which you have specified in the configuration of your Joomla! installation.

Could you please check, if there are any errors indicated in this log file and if so, mail me the log file to contact@vi-solutions.de, so that I could try to improve the update script.

In order to get rid of the problem you will have correct the #__visfields table and add the missing field(s). In the file adminstrator/components/com_visforms/sql/install.utf8.sql you can find the correct field definitions for this table. You have to check, which fields are missing and use an mysql admin tool, in order to create the missing fields. The definitions for the 4 fields added in Visforms 3.7.1 are
Code:
editonlyfield tinyint(1) NOT NULL default 0 addtoredirecturl tinyint(1) NOT NULL default 0 includeinresultmail tinyint(1) NOT NULL default 1 includeinreceiptmail tinyint(1) NOT NULL default 1

I'm sorry for your problems and hope you can manage it.

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

More
8 years 3 months ago #3334 by keep
Hi,

I downloaded Visforms 3.7.7 to update an existing 3.1.2 installation and got the error message mentioned above.
I checked the log there is nothing about these fields: jpst.it/LGwx
I altered the table manually but it shouldn't be the real solution ;)

Thx

More
8 years 3 months ago #3338 by Administrator AV
Replied by Administrator AV on topic Error: 1054 - Unknown column 'editonlyfield'
Hi,

you are absolutely right. This should not be necessary.
I have to check with the code, why the database update does not run properly in some rare cases. I think it has something to do with the fact, that Visforms 3.1.2 (or the Visforms Version for Joomla! lower than 3.6.6) are quite old and that I have missed something in my update script.
Thanks for the information, anyway.

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).
The following user(s) said Thank You: keep

More
8 years 3 months ago #3339 by keep
no problem at all :)
have a nice day

More
8 years 3 months ago #3340 by Administrator AV
Replied by Administrator AV on topic Error: 1054 - Unknown column 'editonlyfield'
Hi,

I have run a series of test with updating Visforms 3.1.2 to Visforms 3.7.7.
I always started with a clean Joomla! 3.3.3 system and Visforms 3.1.2.
Updating Joomla! then to 3.6.0 and testing manuell update (extension manager install) to Visforms 3.7.7 as well as updating via auto update (extension manager update).
But I could not reproduce the problem. All table structures of Visforms tables in the database were correct. And actually I have no glue, why the visfields table update fails on your systems. Sorry.

I've been give a notice about this problem three times now. So hopefully this is a rare problem.

If anybody else get this error message and you have to update the visfields table manually you can use the following sql statements
Code:
ALTER TABLE #__visfields ADD COLUMN editonlyfield tinyint(1) NOT NULL default 0; ALTER TABLE #__visfields ADD COLUMN addtoredirecturl tinyint(1) NOT NULL default 0; ALTER TABLE #__visfields ADD COLUMN includeinresultmail tinyint(1) NOT NULL default 1; ALTER TABLE #__visfields ADD COLUMN includeinreceiptmail tinyint(1) NOT NULL default 1;

Replace #_ with your Joomla! table prefix first!

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum