Admin Homepage SQL error

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
artemisia
Veteran Member
Posts: 59
Joined: 2013-10-01 15:50

Admin Homepage SQL error

Post by artemisia » 2020-01-05 16:49

I've been reconfiguring (adding, dropping, modifying) my tables in the AG designer and directly in my sql server. Now I get an error when displaying the Admin home page "Membership Management" that a query is trying to access a table that's been deleted from both AG designer and the database. That prevents the the page from showing "Newest Updates" etc. Am unable to find any of the error query text in the AG folders/files so it must be dynamic. I've recompiled and refreshed my server folders.

Q: How do I remove any references to old tables that are no longer present in the AG designer?

P.S. As a workaround I've temporarily recreated the errant table (structure only) to remove the error so that the Admin page can display correctly.

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1160
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Admin Homepage SQL error

Post by onoehring » 2020-01-06 15:30

Hi,

the reason maybe?
Did you remove/rename a table? An error occurs, when a table does not exist anymore, but AG tries to show records in that table.
Check the record_owners table as well as the permissions table for unknown tables. Please note, that on linux systems the CASE of the tablenames matters! myTable <> Mytable <> mytable ...

Olaf

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1638
Joined: 2018-04-01 10:12

Re: Admin Homepage SQL error

Post by pbottcher » 2020-01-06 15:35

Hi

just as a thought. Did you, after changing the tables in the designer, rebuild all the files via AppGini? If not, can you try this.

Also you could search through the files for the tablename that you have deleted to see where it is referenced. Not the complete query, but the tablename.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

artemisia
Veteran Member
Posts: 59
Joined: 2013-10-01 15:50

Re: Admin Homepage SQL error

Post by artemisia » 2020-01-07 21:05

Good suggestions. I have found that the problem seems to lie mostly with the membership_userrecords table. By deleting no-longer relevant records and renaming the tableName column to my currently-used table I can get Admin pages to display correctly w/o errors. There were also some old tables recorded in the *.axp (project file) that should have been deleted but weren't. I know now that certain table refs are called on the fly by code in both user and admin functions which make tracing queries a bit difficult. I do not have server permissions to run the usual sql trace/debug tools.

Unfortunately I have had to hack and copy tables and code because there were fatal sql errors after I updated AG version from 5.3 => 5.81, plus an incompatibility of my old tables/code with php v7.1. But I have a new understanding now of how AG is organized that will be helpful from now on.

~Bob

Post Reply