Dataset Row Add / Delete Fatal Error

For some reason I’ve just started getting the following error when trying to add modify a dataset entry.
After the error message is dismissed, it seems it’s processed the change anyway.

Fatal Error - sorry this shouldn't happen. SQLSTATE[HY093]: Invalid parameter number: parameter was not defined

Any ideas?

Running 1.8-rc1. Only change I’ve made recently was to implement a Scheduled Event in MySQL to remove old Dataset entries where their date has passed the current date. Could this have affected it?
Runs weekly. Used in in Alpha3 successfully.
DELETE FROM 'dataset_1' WHERE date('Display Finish') < DATE(NOW())

I’ve no idea if that’s safe to do or not. In general, you shouldn’t be directly modifying the database. Instead, you should use the API to perform automation tasks.

Is there any way I can diagnose this further?

The error itself appears to be PHP related, not SQL as the data is still processed and added / deleted just fine.

Thanks again.

If you can capture a troubleshoot.txt for just that error, and send it in to we can take a look at it. The one error in isolation doesn’t tell us much really.

My guess is in running that SQL, there’s other references to the records you’ve deleted somewhere, and then when you come to edit those references point to records that no longer exist.

For some reason, this error has magically fixed itself today after editing a variety of layouts (not sure if they are linked).

If it happens again, I’ll post back here with more info and logs.

1 Like