Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Request #125

Open
hackgrid opened this issue Jan 26, 2024 · 4 comments
Open

Invalid Request #125

hackgrid opened this issue Jan 26, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@hackgrid
Copy link

hackgrid commented Jan 26, 2024

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.

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 :-)

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
Copy link
Collaborator

  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.

@germain-italic germain-italic self-assigned this Jan 26, 2024
@germain-italic germain-italic added bug Something isn't working good first issue Good for newcomers labels Jan 26, 2024
@hackgrid
Copy link
Author

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
Copy link
Author

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
Copy link
Collaborator

  • Add PHP version verification before generating CRUD pages

@germain-italic germain-italic added enhancement New feature or request and removed bug Something isn't working labels Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants