Anyone else having issues with update forms not saving data. The form submits fine but any changes made are lost.
Craig
Anyone else having issues with update forms not saving data. The form submits fine but any changes made are lost.
Craig
@CSWinnall I’ve possibly experienced this in a client’s app.
Can you see any duplicated records being created within the form’s table/object with the new form values?
No loss of data, but Knack is running excruciatingly slow for me today.
Hi
Not sure if it is anyway related, or if Stephen was referring to our situation, but this morning we suddenly lost the connection from our Location data table to the 18 or so connected tables, and are now almost “dead in the water”.
We’re not sure if this is in anyway related to our previous issue of not being able to create a table from a day or so earlier, which remains unresolved.
Regards
Dean
No new records created. The form submits but no data is saved. It happened a few weeks ago and knack did a fix pretty quick. I’m guessing an update they did overrode the fix.
We have figured out what’s going on.
Knack is adding a query string to some URLs on pages :
#inductiontreatment/historic-clients/client-details/6487372a62800a0027207dc0/risk-assessment2/6487372a62800a0027207dc0/risk-of-seizures/6487372a62800a0027207dc0/?recordId=6487372a62800a0027207dc0&objectKey=object_123
Even pages that have nothing to do with object_123. Looks like we might have to add some code to strip the query string on pages that have forms.
Craig
Yikes. Do they know the cause?
They haven’t said yet but I imagine it’s to do with this:
Hi all,
Very sorry for the issues you are seeing - we are actively investigating and I’ll keep you updated as I learn more.
Thanks,
Kara
We are working on a fix - it is almost ready to deploy.
We are having the exact same problem as described by CSWinnall. First noticed it yesterday with a form to edit our “Destinations” table. I tried recreating both the form and the menu linking to the form, but problem is the same (when I click the submit button the form “blinks”, but does not show a conformation message (or error message) and does not save the changes). Thank you for bringing this up and glad to see the Knack team is investigating.
Hi @shipping
If you add this code it will fix it sitewide until a fix can be provided:
Knack.router.on('route:viewScene', function (slug) {
if (slug) {
// Get the full location hash which includes both slug and query params
const fullHash = window.location.hash.substring(1); // Remove the # character
// Check if there are query parameters
if (fullHash.includes('?')) {
const [path, queryString] = fullHash.split('?');
// Parse query parameters
const params = new URLSearchParams(queryString);
const recordId = params.get('recordId');
const hasObjectKey = params.has('objectKey');
// Check if we need to modify the URL
const recordIdDuplicate = recordId && path.includes(recordId);
if (recordIdDuplicate || hasObjectKey) {
// Remove parameters that should be cleaned
if (recordIdDuplicate) {
params.delete('recordId');
}
if (hasObjectKey) {
params.delete('objectKey');
}
// Reconstruct the URL
const newQueryString = params.toString();
const newHash = path + (newQueryString ? '?' + newQueryString : '');
// Redirect to the cleaned URL
const baseUrl = window.location.href.split('#')[0];
const newUrl = baseUrl + '#' + newHash;
window.location.href = newUrl;
}
}
}
}
Paste this code in your Javascript window in the builder.
Craig
Thanks @CSWinnall
I tried your code but it didn’t fix the problem. We have other custom code, so maybe it is interacting somehow? Either way, we only use this feature of Knack internally (our customers and clients cannot edit the form in question), and I’ve been able to go into the builder and make the few edits I needed to make, so we’ll just wait on the Knack fix. I do appreciate you reaching out though!
@StephenChapman @CSWinnall @shipping
Would any of you be available for a quick call? We would like to take a look at some configurations of the table, form, & rule.
@Kara I’d be available.
Thank you! I will email you an invite
Fixes have been deployed - you may need to refresh the Live App browser
@Kara Thank you! Its working well for us.
Sorry missed this I’ll check the fix in the morning.