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.

I think my visforms tables need updating

More
8 years 9 months ago #1773 by Administrator AV
Replied by Administrator AV on topic I think my visforms tables need updating
Hi,

it even took me a bit longer to find some time to look seriously into this.

According to the visforms_update.php which you sent me, you have maintained Visforms on that website over many versions.
At some point, there was a Visforms 3.3.0 installed and you tried to "update" to Visforms 3.2.0. This "update" was aborted with an error message. After that you uninstalled Visforms and at that moment something went wrong because obviously Visforms was not completely uninstalled. It looks as if at least on recordset remained in the #__extensions table with the result, that the next time you tried to install Visforms, this was considered an update although it should have been considered an installation.

After that moment, the #__visforms table was a bit messed up and this is where your missing fields started.

I have tried to reproduce the problem, installing, updating and uninstalling Visforms in the exact same order you did, but I have never ever had a problem with uninstalling Visforms completely. Sadly, It is almost impossible to reproduce such a problem and afterwards it is almost impossible to find out, what has caused the problem (it may as well be a problem of the Joomla! installer of a specific Joomla! Version....)

As you seem to be able to work with the database, I think you could try to fix the tables manually. (After making a complete backup of the database, including the drop table statement, from which you can restore your database if need be!)

You can find an install.utf8.sql file in the administrator/components/com_visforms/sql folder. This file contains all the info about the #_visforms and the #_visfields tables. Fieldname, type, default.... You can use this file to check, which fields are missing in your tables and to create the missing fields manually according to the definitions made in the .sql file.

Afterwards, you have to open each form in administration and save it, in order to set the values of those options which are stored as JSON strings. (Like "frontendsettings", "layoutsettings" and so on).

I'm very sorry for your trouble, but sometimes not everything goes to plan.

If you think you are not able to repair the tables, feel free to export the #_visforms and #_visfields table of your database to a .sql file and send me the file. I will take a look and make the necessary changes for your.

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 9 months ago #1780 by rs3511
Replied by rs3511 on topic I think my visforms tables need updating
Thank you so much for looking into this. I have a copy/test database that I'm trying to correct and I think I have the tables corrected but when I open each form in administrator and click save, it doesn't seem to propagate the new datafields to that form. Do you think i will have to go into the table for each form and add the missing fields manually?

Thank you again, I would love to help you in your efforts. Either with development or testing; just let me know if I can help.

-RS

More
8 years 9 months ago #1781 by Administrator AV
Replied by Administrator AV on topic I think my visforms tables need updating
Hi,

Visforms uses the default Joomla! way to create edit views in the administration. That means, that there is an xml file (visform.xml, in administrator/components/com_visforms/models/forms) which is responsible for the field definition. So usually it should not be necessary to go into the database again and set default values there.

You can enable "debugging" in the "Global Cofiguration" (Debug System). Go back to the edit form view of Visforms in the Joomla! administration afterwards. I think there is a section that show database query related messages and errors then. Maybe that can help.

If not. Feel free to export the visforms and visfield table into an sql file and send me the file. I will take a look, if the structure is correct.

Thanks so much for your offer to help with improving and maintaining Visforms! I will release Joomla! 3.5.1 sometimes soon and any help with testing this version, so that I can change it's maturity from beta to stable soon, is highly appreciated.

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: rs3511

More
8 years 9 months ago - 8 years 9 months ago #1787 by rs3511
Replied by rs3511 on topic I think my visforms tables need updating
Thanks again. I'm usually pretty good and working with databases but I think I made a larger problem with I messed with my clone/test. If you don't mind, could I can email you the files and let you take a look?

You are correct, I had almost forgot. At some point in the past, I think about a year ago, something went wrong and I ended up rebuilding the website. I imported the database tables for visforms and I bet, that is when things got "out -of-sync". This has given me some ideas on making the install "stupid-person-proof" so that dumb-dumbs like myself don't mess up a good thing. LOL Perhaps some tools like those in virtuemart, for updating/installing database fields if needed. Maybe I could help with a routine like that for visforms.

Also, let me know when the beta version is ready for review and I will put it in a fresh install and test it out.
Last edit: 8 years 9 months ago by rs3511. Reason: included more details

More
8 years 9 months ago #1789 by Administrator AV
Replied by Administrator AV on topic I think my visforms tables need updating
Hi,

you are welcome to send me the database export!
Which Visforms version do you want to run the tables with?

I decided on handling database updates automatically during the Visforms update process. Usually the update script handles all changes of the database properly. The script checks for the installed Visforms version (in #__extensions table) and run step by step all database updates necessary for the new version which is installed. I thought this would be the most end user friendly way (no additional buttons "update database...." needed. And I made it as secure as possible.

But for this implementation it is imperative that the Visforms version stored in the #_extensions table matches the structure of the visforms tables of that versions. If the version information in the #_extensions table is changed or the visforms tables are imported from a "not matching" installation, this causes serious problems.

I have made a lot of changes to the database over the Visforms version. The main problem is, that you always have to know the matching Visforms version, in order to know which database updates you have to run. I tried to make this as stable and secure as possible during the update process but if something is messed up, this will not work and in some cases (as with you) visforms will not work properly after an update. (I is a good thing, that most Joomla! users do not make changes on the database ;) but if people have the knowledge and make changes this can go wrong.)

I'm not sure, if it is really possible to cover that problem better with some database tools, but if you have some good ideas about that feel free to try it. All information needed is available in the script.php. But I must warn you, the information is scattered over many functions and I know myself good enough to admit, that I will only include code into Visforms if I am convinced of it. But if you device something really useful (which I think you will do if you start) that would of course be very fine!

I'll let you know when the next release is available for testing.

Kind 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