New fields NOT being created

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
stepej
Posts: 2
Joined: 2013-08-20 15:28

New fields NOT being created

Post by stepej » 2013-08-20 15:32

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

KSan
AppGini Super Hero
AppGini Super Hero
Posts: 252
Joined: 2013-01-08 20:17

Re: New fields NOT being created

Post by KSan » 2013-08-20 17:09

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.

User avatar
toconnell
Veteran Member
Posts: 204
Joined: 2013-04-09 19:29
Location: Oklahoma City, OK
Contact:

Re: New fields NOT being created

Post by toconnell » 2013-09-19 20:26

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?
Tina O'Connell
Web Dev & Appgini FAN

User avatar
toconnell
Veteran Member
Posts: 204
Joined: 2013-04-09 19:29
Location: Oklahoma City, OK
Contact:

Re: New fields NOT being created

Post by toconnell » 2013-10-22 20:36

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

bambinou
Veteran Member
Posts: 163
Joined: 2013-02-01 15:09

Re: New fields NOT being created

Post by bambinou » 2013-10-22 20:46

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

bambinou
Veteran Member
Posts: 163
Joined: 2013-02-01 15:09

Re: New fields NOT being created

Post by bambinou » 2013-10-22 20:47

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.

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: New fields NOT being created

Post by AhmedBR » 2013-10-22 22:27

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%.
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

bambinou
Veteran Member
Posts: 163
Joined: 2013-02-01 15:09

Re: New fields NOT being created

Post by bambinou » 2013-10-22 22:38

Hi

Yes I tried this already. I even tried to log back in the admin panel and back in again. No chance.

Ben

bambinou
Veteran Member
Posts: 163
Joined: 2013-02-01 15:09

Re: New fields NOT being created

Post by bambinou » 2013-10-30 08:55

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

AhmedBR
AppGini Super Hero
AppGini Super Hero
Posts: 327
Joined: 2013-09-19 10:23

Re: New fields NOT being created

Post by AhmedBR » 2013-10-30 13:42

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.
AppGini 22.14 - xampp 3.3.0 - PHP 7.4.30 - Summary reports - Calendar - Mass update - Messages - AppGiniHelper

bambinou
Veteran Member
Posts: 163
Joined: 2013-02-01 15:09

Re: New fields NOT being created

Post by bambinou » 2013-10-30 16:13

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.

Post Reply