Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The method '_uploadErrored' does not exist. #178

Open
linuxonrails opened this issue Feb 18, 2025 · 2 comments
Open

The method '_uploadErrored' does not exist. #178

linuxonrails opened this issue Feb 18, 2025 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@linuxonrails
Copy link

CBWire is returning an error after trying to upload an image.

In the file modules/cbwire/includes/js/livewire.js a non-existent method _uploadErrored is called:

this.component.$wire.call("_uploadErrored", name, errors, this.uploadBag.first(name).multiple);

Type:        	CBWIREException
Message:	The method '_uploadErrored' does not exist.

It happens sometimes.

cbwire module version: 4.1.5

@grantcopley
Copy link
Collaborator

grantcopley commented Feb 18, 2025

@linuxonrails Thanks for reporting this. There does seem to be a missing _uploadErrored function that Livewire is sending but CBWIRE doesn't have. Could you post here the payload that Livewire is sending to your server when it's trying to call the uploadErrored function? You can find this in your browser's dev tools under the XHR tab.

@linuxonrails
Copy link
Author

@grantcopley thanks!!!

{"_token":"EBC622049006AA767973428B3D8BA755D158E61C","components":[{"snapshot":"{\"data\":{\"i_am_the_user_of_the_page\":true,\"previous_about_image\":\"https://cloud10.todocoleccion.online/tc/2025/02/13/sobremi_E6F11A92-CF91-42D6-B227993AD84A9266.jpg\",\"previous_about\":\"¡En proceso de completar mi colección de novelas de Mundodisco! Me interesan el cine, los juegos de rol y los juegos de mesa.\",\"myFile\":\"\",\"i_am_editing_the_page\":true,\"user_slug\":\"davidmoreno-1\",\"error_msg\":\"\",\"previous_about_image_text\":\"Presentación\",\"about_image\":\"https://cloud10.todocoleccion.online/tc/2025/02/13/sobremi_E6F11A92-CF91-42D6-B227993AD84A9266.jpg\",\"about\":\"¡En proceso de completar mi colección de novelas de Mundodisco! Me interesan el cine, los juegos de rol y los juegos de mesa.\",\"about_image_text\":\"Presentación\"},\"memo\":{\"id\":\"f0698b0fc34d027c1e3451c1c207323d\",\"name\":\"usuario.show.Presentation\",\"path\":\"usuario.show.Presentation\",\"method\":\"GET\",\"children\":[],\"scripts\":[],\"assets\":[],\"isolate\":false,\"lazyLoaded\":false,\"lazyIsolated\":true,\"errors\":[],\"locale\":\"en\"},\"checksum\":\"f9f66fa895026e389a10ce006daf3f59afaec8db50cdb60f152af599b32f9192\"}","updates":{},"calls":[{"path":"","method":"_uploadErrored","params":["myFile",null,false]}]}]}

I see the error in CF:

                        Can't cast Object type <span class='highlight'>[Struct]</span>
                        to a value of type <span class='highlight'>[Resource]</span>

modules/cbwire/models/CBWIREController.cfc:142

I am working on it.

@grantcopley grantcopley added the bug Something isn't working label Feb 20, 2025
@grantcopley grantcopley added this to the 4.2 milestone Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants