jan-vince / smallrecords

OctoberCMS plugin to store and manage records and lists
MIT License
30 stars 11 forks source link

Error on searching things in lists #93

Closed artistro08 closed 2 years ago

artistro08 commented 3 years ago

Hey! I get this error when I search in the list I created using your plugin in the console (JavaScript)

jquery.min.js?v=bb5abcd0:2 Uncaught TypeError: Illegal invocation
    at i (jquery.min.js?v=bb5abcd0:2)
    at qt (jquery.min.js?v=bb5abcd0:2)
    at qt (jquery.min.js?v=bb5abcd0:2)
    at qt (jquery.min.js?v=bb5abcd0:2)
    at qt (jquery.min.js?v=bb5abcd0:2)
    at qt (jquery.min.js?v=bb5abcd0:2)
    at qt (jquery.min.js?v=bb5abcd0:2)
    at Function.k.param (jquery.min.js?v=bb5abcd0:2)
    at Function.e.param (jquery-migrate.min.js?v=bb5abcd0:192)
    at new Request (framework.js?v=bb5abcd0:133)
    at e.fn.init.$.fn.request (framework.js?v=bb5abcd0:473)
    at framework.js?v=bb5abcd0:574

Not sure why that's happening. The intended function is to search, but I can't. This is on the Backend btw

jan-vince commented 3 years ago

Hard to say without any more details :(

artistro08 commented 3 years ago

My bad! I'm on the latest version of October CMS V2. This happens on the back end when you search any list under the records plugin.

artistro08 commented 3 years ago

Also to note, there are no errors in the back end.

jan-vince commented 3 years ago

Hard to say. I do not use OC2 yet so I can't test it right now.

artistro08 commented 3 years ago

Is there anything I can do to help find out more about the error? (ex. Where to look, how get to the bug, etc)?

jan-vince commented 3 years ago

I would start with XHR - you can open Developers tools (Safari, Chrome) and see what is comming through AJAX when you start search.

artistro08 commented 3 years ago

Well, I don't see anything in XHR since it doesn't make it that far. I think it may be an issue with the OctoberCMS v2 Library considering it says nothing about your plugin. I could be wrong, but I went to their discord to report things since I don't want to open an issue just yet. 

[https://devingreen.me/]

Devin Green Freelance Full Stack Designer devingreen.me [https://devingreen.me/]   [https://facebook.com/artistro08] [https://facebook.com/artistro08]  [https://twitter.com/artistro08]  [https://instagram.com/artistro08]  [https://www.linkedin.com/in/artistro08/]  [https://dribbble.com/artistro08] On 9/27/21 6:21:56 AM, Jan Vince @.***> wrote: I would start with XHR - you can open Developers tools (Safari, Chrome) and see what is comming through AJAX when you start search. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub [https://github.com/jan-vince/smallrecords/issues/93#issuecomment-927777882], or unsubscribe [https://github.com/notifications/unsubscribe-auth/ABRBEXRWHBMLQRO23RNQFFDUEBHVJANCNFSM5EZF2USA]. [6feaf008-c41b-41e6-9331-58834dc72e3c]

jan-vince commented 3 years ago

Maybe try create different list with different data. Can be due some special chars in one of your columns.

artistro08 commented 3 years ago

I did try that. It's on all the lists in the search under the Records plugin.

So the founder said this in the discord chat:

Likely related to the plugin then. If one passes an undefined variable to the data attribute, it will cause this error

So most likely, the JavaScript that's being called on the backend is the issue.

jan-vince commented 3 years ago

I have never had this problem and SmallRecords do not pass any extra JS to backend.

Maybe related to some changes in OC2, but right now I have no time to test as I still use OC1.

Will keep this open and check again when I switch to OC2.

artistro08 commented 2 years ago

Imma go ahead and close this. Looks like it's fixed in the latest build