BUG: Important, problem with wrong URL coding by pnp.sp.web.lists and Lookups

@Nikita_Kurguzov @Margo

In many forms in our company we use PlumsailForms for our Sharepoint Lists and many of them started catching errors while Lookups which we use in theme started to makien wrong request saying that query is incorect - the same is with pnp.sp.lists.. whe we try get data from other lists... some of the queries are double encoded - for example space is alwes was encoded like %20 and now in url is encoded as %2520 where %25 codes "%" sign... and this is not in all form, it apears randomly. Any ideas?

2 Likes

Wa cannot conduct operations on our production. Ths bug stopped all of our systems @Nikita_Kurguzov , @Margo

1 Like

@jacek, @szymanskicode,

We're looking into the issue. I'll let you know when there's an update.

Thx. Looking forward for good news.

@jacek, @szymanskicode,

We've fixed the issue. Please clear the browser cache and test.

Let us know if you are still encountering any issues with the lookup field.

Thx. Looks good for now :slight_smile:

We are facing problems with manually created URLs. We had to manually encode them before, now it seems like they are automatically encoded.

What has changed? Should we expect this to stay, or this might be another issue? Did you maybe updated some npm's or nugets on your side that might have affected that?

Please let us know.

Dear @jedrzej.dankowski,
Could you provide a bit more context? Our developers are looking into it, but we'll need more info - code samples, error messages, etc.

So every time we manually formed odata query string, e.g. filter, like this

      const bulkFilterRaw = arrayOfChunks[i].map((param) => this.#formContext.listsColumns.controlSessionRegister.container + " eq '" + param + "'").join(" or ");
      const bulkFilter = encodeURIComponent(bulkFilterRaw);
...
      let result = await pnp.sp.web.lists.getById(this.#formContext.listsIds.configLeader).items.select(["Email", "Type"].join(",")).filter(bulkFilter).get();

everything worked fine. today it simply stopped working for every form we had. we use full screen forms, because Panel has limitations (the sp context is undefined [strange, you could fix it as well])..

normally spaces were encoded as '%20' - properly. today they became '%2520' (what means % was encoded twice, as if encoding was introduced today somehow??).

moreover, we tried to save the changes as full screen form (success), but it was not opening, because template json was not found! we had to save it as a panel to make it work (but we lost sp context!).

sample:



Dear @jedrzej.dankowski,
In the latest version, we updated pnpjs. Now, it automatically encodes filter parameter. Please, try to remove encodeURIComponent in their custom code.

Dear @jedrzej.dankowski,
For this issue, what exactly are you referring to?
it was not opening, because template json was not found!
JSON templates are not used to open form in the browser, only in the editor.

In browser, forms are opening on their own page, in the latest versions we're using built-in pages for form customization, make sure that you have the latest version of the app package added.

Hello @Nikita_Kurguzov , @Margo ,

W understand problem with encoding and we fixed it on our end just for removing previous encoding in our code - after removing works fine.

But i need a bit more advice to solve a problem with saveing templates for SP Forms.
Heaving normal SP list we make Plumsail templates for NEW and EDIT form. And when i save Plumsail template with option "Panel" selected, end press NEW on sharepoint list - everything works fine, form is opening in panel mode and works fine, but...

but when i save Plumsail template with option "Fullscreen" selected and i press NEW on sharepoint list i got blank white page with infinite loader spiner and Error in console saying:

"Nie istnieje" means doesnt exist...

Why it is happening and how to fix this?

What more i have fount is that same form for one users works and for the others it doesnt work. In PlumsailForm folder there is json file with form called as ITEM, and for some users when they click on ADD NEW ITEM on sharepoint list the form ist searching the ELEMENT item... in some other forms is oposite, in forlder files there is filse with ELEMENT signature but the form is searching for ITEM file... what is this?

Dear @szymanskicode,
Could you tell me the version of the app package in the app catalog?

P.S. The issue might indeed be present in latest version as well, we'll try to fix it ASAP.

For now, as a workaround, please, change Content Type name for different languages, so it's the same for all users.

We have 1.1.0.2 with @szymanskicode in our tenant. @Nikita_Kurguzov is it possible that you give us a hint how to translate it?

That's the latest version. I've asked since it was a bug of our older forms, but was fixed since. Apparently, it came back after some changes.

Essentially, when you create a form, it's created for a Content Type, and right now we use the name of the Content Type to create the URL. Now, since the name is different in different languages, as seen with Item/Element Content Type, it brings some issues on redirect.

This is quite severe, so we'll try to fix it ASAP, we know what the reason fo this behavior is, and we know of a couple of ways to deal with it. Still, it would require some dev time and testing before we roll out the next update.

Meanwhile, try changing Content Type name so it's the same for both/all languages that your users have, and the issue should be mitigated, at least until the fix is released.

Hello,

@Nikita_Kurguzov could you clearify what does it means to "change Content Type"? What? Where? How? Thx in advance.

Dear @szymanskicode,
You can go to Site Information > Site Settings > Content Types gallery, but you need to be in Polish version of the site, for example:

Here you can rename Element to Item, or you can do the opposite for the English version of the site, doesn't matter, it will only change for this language.

OK, thx for make it clear.
Any idea when you will be able to fix this issue? more less?

Hi @szymanskicode,

It takes time to publish an update in the Microsoft Store, so the fix should be out in about a month.

1 Like