jan-vandenberg / cruddiy

No-code Bootstrap PHP CRUD generator
http://cruddiy.com
GNU Affero General Public License v3.0
252 stars 80 forks source link

Invalid Request #125

Open hackgrid opened 9 months ago

hackgrid commented 9 months ago

Hi,

first time using this app, thx for your work! :-)

When using "core/" I got my first problem:

"Error loading character set utf8mb3: Invalid characterset or character set not supported "

I changed it to "utf8mb4" and it worked then.

2.

After generating the app and navigating to the list for the first time, I got the following error:

ERROR: Could not able to execute SELECT Quittung.* FROM Quittung WHERE 1=1 GROUP BY Quittung.Id ORDER BY Id asc LIMIT 0, ;. You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 6

This was resolved by actually inputting a value in the "Items per generated page" field while in setup. (see "LIMIT 0,;" If this is a needed value, a default value would be good - or a warning to input one :-)

3.

Then I tried creating the first item, but after inputting all required fields and pressing "Create", I just get the error:

Invalid Request

Sorry, you've made an invalid request. Please go back and try again.

Is there a way to enable a debug mode or a log file, while this operation failed for me?

Thanks and kind regards

germain-italic commented 9 months ago
  1. If this is a needed value, a default value would be good

True, but there should have a default value of 10 as per source code.

I've checked on a fresh instance and did not reproduce the problem (got the default 10). Is there any chance that you've input an empty value? Maybe with the tab key.

  1. Invalid Request

This usually happens when Cruddiy can't find the primary key in your table. Thanks for providing your db structure.

I've had no trouble with the table quittung. However with the table gegenstand, I see an issue with the column QuittungId.

I'll dig further this week-end.

hackgrid commented 9 months ago

Thx!

The default value was fixed after the latest release, I use master now :-)

It seems mysqli_insert_id returns 0, so trying to open Quittung-read.php?Id=0 results in this error.

I am not sure why, if I execute the generated SQL statement manually in phpMyAdmin, everything works fine and gets inserted...

hackgrid commented 9 months ago

Sorry, the problem was a too old PHP version (7.3.33) on my Synology NAS. For most web targets I use PHP 8.x there, so I got confused...

Works fine now, thanks! :-)

germain-italic commented 9 months ago