backdrop-contrib / insert

Utility that makes inserting images and links to files into text areas much easier.
GNU General Public License v2.0
3 stars 4 forks source link

Insert fails if Drupal compatibility is disabled #11

Closed yorkshire-pudding closed 3 years ago

yorkshire-pudding commented 3 years ago

Not sure if this can be reproduced as I don't know what factor is causing this issue on one site but not another.

Issue

ltK5lGDFHI chrome_LRzbN5fhE8

Site working ok

56D59sza9C

Can anyone give me any clues as to what might be causing this on one site but not another? I'm able to upload images to this site on a content type without insert enabled, hence why I think this may have some link to Insert.

indigoxela commented 3 years ago

Can anyone give me any clues as to what might be causing this...

Do you have access to the webserver/php logs? That might at least give a hint. 500s are often (not always) caused by file system permission problems.

Also: are you sure, this is caused by the insert module? Or does it happen with all fields with upload functionality (image, file...)?

yorkshire-pudding commented 3 years ago

Hi @indigoxela - thanks for getting back to me. If I upload on a content type that doesn't have insert on the same site, then it uploads without a problem.

However, your prompt to look at the logs has identified the culprit: One site has drupal compatibility enabled, and insert works. The other doesn't and it doesn't work.

image image

Looks like this is the offending function: image

yorkshire-pudding commented 3 years ago

I'll try and see if I can fix this and put a pull request in

ghost commented 3 years ago

Sounds like it just need a one-line change to this: https://docs.backdropcms.org/api/backdrop/core%21includes%21common.inc/function/backdrop_http_build_query/1

yorkshire-pudding commented 3 years ago

Sounds like it just need a one-line change to this: https://docs.backdropcms.org/api/backdrop/core%21includes%21common.inc/function/backdrop_http_build_query/1

Aye - I found that pretty quickly.

ghost commented 3 years ago

Thanks @yorkshire-pudding, PR merged.