This site has operated perfectly 2018, and then recently the database queries began to fail. When I started investigating, I found the databases with joins were failing due to some reason aliases were added on their own. As this happened, the queries began to fail.
What would cause this to happen inside a site that is this old? I believe the site was built with Wappler 3? I only ask so that I can be aware of the cause and hopefully prevent any further occurrence of this bazaar behavior – if that is possible.
It appears the app started adding aliases to the join queries all by it self. It seemed to replace the aliases that I had assigned. When I found the occurrences, the app seemed to replace existing aliases with ‘undefined’. Once began to happen, of course, the queries started failing. What’s weird is it was all working for years and then for some reason something triggered all these queries to add “UNDEFINED” aliases throughout the site.
This type of activity has popped up throughout the queries of the database. As I alluded to, it seems that activity started around several months or so ago.
If you have any ideas or suggestions of how I can prevent this from happening again, your help is very welcomed and very appreciated!
Maybe it has to do with php version on your server?
You updated wappler and some db operations don’t work with the current php version
That’s the first thing comes to my mind…
I wouldn’t change anything in my project if this has happened to me. I would try to find what change was made on my hosting provider environment.
I don’t know if you could just try localy your project by rolling back a few versions of php version…
What php version does your hosting enviroment run with now? Can you create a loacl server and try previous verionns?
I disagree this is related to a PHP version, PHP version changes don’t mutate your app files. How are you seeing changes in your database queries in Wappler editor? This is probably something that got broken with a Wappler update
Both. Online and in Wappler. However, these sites have been active from 2016. Of course I’ve updated them as time passed. There must have been a huge change for them to just go loco. Deputation.US will not even allow a login. Ha!
From briefly reading this, I have a feeling it’s two separate issues:
The first being the PHP version changed on the server, which caused some kind of issue with queries or something similar of that nature because a feature was deprecated in the newest release. This post says at the time 5.6 was what most of the code was for. If the site hasn’t been touched since 3.0, it probably didn’t receive the later compatibility updates (if there were any?) for later PHP versions.
And then second being since it was mentioned the site was built in Wappler 3, and assuming the project hadn’t been opened in Wappler 4 or 5, I wonder if loading the project up in 6 after last being edited in 3 caused a second separate issue which caused is causing the undefined aliases. I’m pretty sure I only used Wappler 3 for a few weeks, but I vaguely remember having a similar issue in the past with one of my projects (Might’ve have been 3 to 5?)
Chances are, if the files haven’t been changed on the server, reverting to an older PHP version would fix it.
From memory, some php functions need version 7.4 minimum to function correctly due to some changes made around late V4.
I have been using V8+ without issues.
I am not certain of who or what caused it. However, Bluehost migrated a lot of our older projects shortly after COVID (Ha!). Nevertheless, the connectivity was broken while they messed up all our projects. I had to get extra domains and mirror the projects to keep the clients happy. It was a nightmare.