I have added some new fields to a table and re-created the project
I have moved the files across to the server and logged into the admin account
The fields appear on screen when using the generated application BUT the actual new database fields have NOT been created
Is there a step i have omitted in order for these database fields to be created?
Cheers
New fields NOT being created
Re: New fields NOT being created
Log into your Cpanel and delete setup.md5 file from the root directory where your application is installed. Then start the admin interface again. This should trigger the creation of new fields in the database. As always, it is a good practice to make a backup of the table that is about to be modified. Good luck.
Re: New fields NOT being created
KSAN, if your getting duplicate records appearing only on the web based gui of the application and the mysql table is only showing one record.. can this be the same issue? Could this fix help fix my issue too?
Not sure.. help?
Not sure.. help?
Tina O'Connell
Web Dev & Appgini FAN
Web Dev & Appgini FAN
Re: New fields NOT being created
I have 5.20 and just saw this issue again. I am seeing after adding a field to my app gini file and then rebuilding it.. and loading it, it gives me an error as if that field is not there.. It shows in the php file but in phpmyadmin the field is not there.. If I add the field in phpmyadmin then the error goes away and the page will load perfectly. The issue still remains that all the properties appgini assigned to that field are not there.. it then has to be reloaded and built in order to have the properties function right. So for some reason with an existing database your updating the field changes are not updating as they should.
Tina O'Connell
Web Dev & Appgini FAN
Web Dev & Appgini FAN
Re: New fields NOT being created
Yes I have the exact same issue.
In my calculations.php file I have this:
* Called after executing the update query and before executing the ownership update query.
*
* @param $data
* An associative array where the keys are field names and the values are the field data values.
* For this table, the array items are:
* $data['id'], $data['start_date'], $data['end_date'], $data['units'], $data['cost']
* Also includes the item $data['selectedID'] which stores the value of the primary key for the record.
*
But in the appgini I have created :
$data['id'], $data['start_date'], $data['end_date'], $data['units'], $data['cost'], $data['start_reading'], $data['end_reading'],
I opened another thread yesterday as I could not manage to execute this:
$data['units'] = $data['start_reading'] * $data['end_reading'];
But now I understand, it is because appgini has not created them.
Strangely enough, the database fileds have been created but the php code is not there in the hook files.
Must be a bug in the 5.20 version. I am sure Ahmed is working on it.
Ben
In my calculations.php file I have this:
* Called after executing the update query and before executing the ownership update query.
*
* @param $data
* An associative array where the keys are field names and the values are the field data values.
* For this table, the array items are:
* $data['id'], $data['start_date'], $data['end_date'], $data['units'], $data['cost']
* Also includes the item $data['selectedID'] which stores the value of the primary key for the record.
*
But in the appgini I have created :
$data['id'], $data['start_date'], $data['end_date'], $data['units'], $data['cost'], $data['start_reading'], $data['end_reading'],
I opened another thread yesterday as I could not manage to execute this:
$data['units'] = $data['start_reading'] * $data['end_reading'];
But now I understand, it is because appgini has not created them.
Strangely enough, the database fileds have been created but the php code is not there in the hook files.
Must be a bug in the 5.20 version. I am sure Ahmed is working on it.
Ben
Re: New fields NOT being created
I also wanted to say that I have used the "recreate field" options in appgini and delete the setup.md5 file to reset the lot...it has not worked.
Re: New fields NOT being created
I have solved this problem in MOST CASES doing like this:
Before I upload the new files, I leave the PAGE of one of the tables (especially one that will be changed) in table view.
UPLOAD ALL FILES.
Once the upload is completed I click on SHOW ALL.
In most cases this takes care of the update (not 100%, but I could say more than 90% works fine), could not detect why it fails in the rest 10%.
Before I upload the new files, I leave the PAGE of one of the tables (especially one that will be changed) in table view.
UPLOAD ALL FILES.
Once the upload is completed I click on SHOW ALL.
In most cases this takes care of the update (not 100%, but I could say more than 90% works fine), could not detect why it fails in the rest 10%.
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper
Re: New fields NOT being created
Hi
Yes I tried this already. I even tried to log back in the admin panel and back in again. No chance.
Ben
Yes I tried this already. I even tried to log back in the admin panel and back in again. No chance.
Ben
Re: New fields NOT being created
Ok Everyone.
Here is something stupid but could make you go around in Circle for ages.
The reason that some fields do not get updated in AppGini is because of the ftp feature. Please remember this all because it will happen to you one day or another.
Let's say you are using FileZilla, now you choose all the left side files from your local AppGini folder and upload them to the remote server, all good there.
Now on the next step, you do a minor table change in the AppGini folder, you have "NOT REFRESHED" the left side of Filezilla and clicked on "upload".
Here is where the problem happens.....
You must refresh the left side screen of FileZilla and re-select all your files, only then, upload.
Because FileZilla do not have an auto refresh mode like Netbeans for example, all your changes do not get passed from one side to the next without a refresh.
Hope this helps,
Thank you,
Ben
Here is something stupid but could make you go around in Circle for ages.
The reason that some fields do not get updated in AppGini is because of the ftp feature. Please remember this all because it will happen to you one day or another.
Let's say you are using FileZilla, now you choose all the left side files from your local AppGini folder and upload them to the remote server, all good there.
Now on the next step, you do a minor table change in the AppGini folder, you have "NOT REFRESHED" the left side of Filezilla and clicked on "upload".
Here is where the problem happens.....
You must refresh the left side screen of FileZilla and re-select all your files, only then, upload.
Because FileZilla do not have an auto refresh mode like Netbeans for example, all your changes do not get passed from one side to the next without a refresh.
Hope this helps,
Thank you,
Ben
Re: New fields NOT being created
Nice tip, but this is not THE reason.
You see I do a lot of testes on XAMPP, and still this happens every now and then, I mean there is no upload or refresh, it is on the fly.
You see I do a lot of testes on XAMPP, and still this happens every now and then, I mean there is no upload or refresh, it is on the fly.
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper
Re: New fields NOT being created
Thanks AhmedBR,
Strange, since I am doing this, I don't get anymore problems. I will keep doing this for a few month and see if this was my problem.
Strange, since I am doing this, I don't get anymore problems. I will keep doing this for a few month and see if this was my problem.