We rushed out a fix, before you disabled the endpoint, so we're not sure if that will help. Will it prevent tags from appearing on prismicClient.data.forms?
Here's some cobbled-together code:
const {Prismic} = require('prismic.io');
Prismic.Api(prismicEndpoint, (err, prismicClient) => {
prismicClient.data.forms.forEach(form => {
prismicClient.form(form).ref(prismicRef).submit((err, res) => {
// Do something with res
});
});
});
And an example stack trace:
Error: Unknown field ref
at Object.SearchForm.set (~/our-app/node_modules/prismic.io/dist/prismic.io.js:460:34)
at Object.SearchForm.ref (~/our-app/node_modules/prismic.io/dist/prismic.io.js:484:25)
at submitForm (~/our-app/some-code.js:46:7)
at ~/our-app/some-code.js:120:12
at createPrismicClient (~/our-app/some-code.js:17:10)
at Object.prismicSubmit [as submit] (~/our-app/some-code.js:106:4)
at ~/our-app/some-code.js:89:32
at ~/our-app/node_modules/async/lib/async.js:356:13
at async.forEachOf.async.eachOf (~/our-app/node_modules/async/lib/async.js:233:13)
at _asyncMap (~/our-app/node_modules/async/lib/async.js:355:9)
It would be a significant amount of work for us to migrate to your new library. We really just need confidence that we're being notified of all breaking changes, because your related blog post didn't prepare us for this.
In fact your code should work. But as i said we don't update this kit anymore. If it doesn't work i advise you just to just filter the tags form. If i take your code, it will look something like:
const {Prismic} = require('prismic.io');
Prismic.Api(prismicEndpoint, (err, prismicClient) => {
prismicClient.data.forms.forEach(form => {
if (form !== 'tags') {
prismicClient.form(form).ref(prismicRef).submit((err, res) => {
// Do something with res
});
}
});
});
About the communication on the change, we sent out multiple emails about the upcoming change over 3 months ago and it’s seems you were unsubscribed from our mailing list. Would you like us to re-subscribe your email address to receive further updates?
That's pretty much the fix we ended up implementing.
We did receive the communication about the change (via another subscribed email address) and we got in touch at the time, to try and avoid any incidents. After that, we were fairly confident that we weren't using the deprecated "tags" property, so took no action. We still don't understand how the changes described in your blog post have any relation to the separate "forms" property, to which this issue seems to relate.
We appreciate that you no longer maintain this library, but we're still very reliant on it and there's absolutely no way we could have anticipated it breaking, from your information in the communications.
I agree it would have been very hard for you or your team to anticipate that this change would cause such an issue. This is a specific edge case and even so, I've passed your concerns to the rest of the dev team about the issues this change caused with this kit.
I don't imagine there will be any updates made to that kit, but this experience will help us think about such cases in the future so that we can work on ensuring that something like this doesn't occur again.
Thank you for understanding and apologies again.
system
(system)
closed as resolved, flag & select 'Something Else' to reopen.
8
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.