giandonatoinverso / PHP-Dynamic-Qr-code

PHP Dynamic Qr code is a script that allows the generation and saving of dynamic and static QR codes
MIT License
243 stars 73 forks source link

Newly created qrcodes don't show up on the web ui, and also changing the address of an existing dynamic qrcode don't show on the list of URL column. #89

Closed hkdemiralp closed 4 months ago

hkdemiralp commented 4 months ago

Hi, I encounter two problems. 1- If I change the URL address of an existing dynamic qrcode, the web UI doesn't show the updated URL (In the "List all" menu). It still shows the old URL. If I press the edit button again to change the URL, I see the URL shows the updated URL. And, if I scan the qrcode, it successfully goes to the updated URL.

2- If I create a new dynamic qrcode, it does not show in the list of qrcodes. So I can't access it on the web ui. But If I go to the web server "saved_qrcode" directory, I see the qrcode is created successfully and works when scanned. I think it is related to the bug #75. The web UI is not updated for later creations or edits of qrcodes.

giandonatoinverso commented 4 months ago

Hi, so have you upgraded?

hkdemiralp commented 4 months ago

I upgraded many times and go back to the previous state to test. But to be sure, is there a way to see if I upgraded or not in the server or web UI or database?

giandonatoinverso commented 4 months ago

In the database you should have the same columns that you can see in the sample_data.sql file in the folder here on github

hkdemiralp commented 4 months ago

These columns exist in the database: (id, id_owner, filename, format, identifier, link, qrcode, scan, state, created_by, created_at, updated_by, updated_at)

giandonatoinverso commented 4 months ago

Yes, then you have upgraded. I'm sorry about the bug, I'll mark it as such in the issues.

I invite the community to contribute

hkdemiralp commented 4 months ago

I am not a developer, but I looked at the database and noticed the wrong table was updated when I created the new qrcode. "qr_dynamic_qrcodes": (The right table is not updated. It is still at creation date 2023-12-25 17:44:26.0) "qr_qr_dynamic_qrcodes": (The wrong table is updated 2024-02-24 10:26:01.0) So, bug #75 is the reason. Probably, updates go to the wrong table, and the web UI gets the information from the right but not up-to-date table. Sorry for my lack of PHP and programming knowledge.

giandonatoinverso commented 4 months ago

Yes I think so too. I currently don't have time to update the project, I invite the community to contribute

hkdemiralp commented 4 months ago

I see. Thank you for this great project. Any recommendation on where to start investigating the source code for this bug? I'll look at the docs.

giandonatoinverso commented 4 months ago

Solved in the new release. Download the new code or use the latest docker image