Problems after renaming database table or columns

OS info

  • Operating System : Windows 10.0.18362
  • Wappler Version : 2.5.2

Clicking on Query Builder for random existing Server Actions causes the QB window not to open and the Action unable to be saved.

Please ignore my later actions around database connections in the log file.

Steps to reproduce

  1. As above, the behaviour is random

Please do attach the error log to this topic as well :slight_smile:

Oh, I have to attach it manually!

Where does it get saved to? Shouldn’t it have auto attached?

At the moment I can’t get Wappler to restart in Logging Mode…

Please cehck the following article, it explains where to find the log file:

Especially this part:

Manual procedure

In case the above procedure do now work somehow, here are instructions of where you can locate the debug log your slef so you can post it to the forum manually.

  • for Windows it is located at:
    C:\Users\username\AppData\Local\Wappler\User Data\chrome_debug.log
    (make sure hidden files are visible in Windows Explorer)
  • for Mac it is under:
    /Users/username/Library/Application Support/Wappler/chrome_debug.log
    or shorter: ~/Library/Application Support/Wappler/chrome_debug.log
    (You can choose in Finder / Go To Folder ~/Library/Application Support/Wappler first)

So when you find this log file, zip it and post it in the bug topic in this forum that describes your problem. Make sure you get the file right after the problem was occurred.

Here we go! :slight_smile:
chrome_debug.zip (3.4 KB)

Unfortunately due to huge amount of expression errors, as mentioned, I can not see if there is anything wrong.

So try resolving all those first and then let us know if you have any other problems

Try this one then George… I have no .php files open, so hopefully you can just see the Server Action actions not working…

report_2020-1-3_16-42-55.zip (159.9 KB)

I’ve realised one thing I did which could have caused this…

For example, I have a server action folder called Contacts , and I tried to change the name to contacts , so with a lower case c … and i got an error message about doing this - it said destination folder still exists

Could this have upset the server action database in some way??

@Teodor, is there something I can send you from my file structure for you to see what has happened?

Yes, please attach the error log.
your last zip only contains a screenshot.

The problem you describe appears when you change a table field name which is specified in a query. It prevents the query opening. Have you renamed table fields?
Changing case of a server action not being reflected in the file name is a side effect of windows which ignores case change as it is not case sensitive.

1 Like

Thanks for your idea Brian!

Well in the early stages of development I do relatively often change table field names, yes. That is a normal thing to do as you work towards a consistent data structure…

… so if that locks you out of a query with no error message, how are you supposed to work around the issue?

I never considered it necessary or read anything about needing to keep a personal log of all the table name changes.

In this case it is accessing the contacts table which hasn’t changed. I did add a column to the users table recently. but nothing to do with the security…

:thinking:

Here you go @Teodor!
chrome_debug.zip (2.9 KB)

First of all - are you sure your database connection step is fine?
Can you open it check the credentials, as well as the address and port settings, click TEST, then save the server action?

So I can open it and test it and all is okay… see below.

But the Server Action itself won’t save! :frowning:

… and if I copy the Server Action, it has the same problems…

What do you mean? Are there error messages? Have you selected the right target?
Also has anything (table name, column name, column removed etc.) changed in ANY table used in ANY query in this server action?

  1. When you save, there is no notification. When you then move to another server action you get the “your current Server Actions file is not saved yet” message.

  2. The target is correct.

  3. Yes, it is possible that things have changed in tables. What is the issue here?

I am hoping that when Wappler finally gets it’s inbuilt database table editor then changes made throughout that will be replicated throughout server actions within the project (HINT TO TEAM)

I understand your frustration, i am re-doing a site I built about 16 month ago where some names have been changed and I am having to manually check the server action content in code view and spot the changes so I can work on the old server actions, in my case it is mainly redundant fields removed rather than renamed but same result. This is a long outstanding reported isue