Insert photo and Upload file buttons not working

This topic contains 13 reply and 7 voices, and was last updated by Pernes 9 years, 11 months ago
Viewing 13 Posts - 1 through 13 (of 13 total)
Author Posts
April 25, 2014 at 6:19 pm 19397
Pernes When someone tries to upload a photo or insert a file into a post, it does not work and forces page to the top. I inspected the element and it is inserting the page url with "#" as the href on the li class of both of these.. Do not think it is my theme as it worked fine earlier. I did add Theme my login since and updated to WP 3.9. Any help appreciated.
April 26, 2014 at 6:44 am 19432
Dana Dana

I have figured this one out myself.. Thanks

April 26, 2014 at 12:57 pm 19443
Oritro Ahmed Oritro Ahmed

Please share with us, how you solved it. It might help us in future to refer someone with the same problem !

April 26, 2014 at 11:13 pm 19457
Dan Dan

Please share the solution.

I’m hitting the same issue and it’s driving my client nuts. There are 5 upload fields, and all are broken. This looks like a bug in WP User Frontend Pro, as there are no javascript errors in the JS console. wp_footer() is loading scripts fine, including the uploader JS.

I would like a fix to this issue ASAP.

Thanks
Dan

April 27, 2014 at 4:13 am 19466
Mahi Mahi

Hello Dan,

make sure they all got different meta_keys.

Except that i can’t see any other reason for not working this!

April 27, 2014 at 4:16 am 19467
Dana Dana

My problem was that I trying to implement two forms on one page. When I deleted one of the forms all of the upload functions worked fine.

April 27, 2014 at 7:43 pm 19484
Oritro Ahmed Oritro Ahmed

Okey Dana, Thanks for the Update 🙂

April 28, 2014 at 6:16 pm 19524
Dan Dan

Nope, there’s only 1 form on the page, and there’s no clash of meta field names. Really not happy. I shouldn’t have to debug your code. If I fix it for you, I’ll have to charge you for it.

Dan

April 28, 2014 at 6:22 pm 19527
Mahi Mahi

Hello dan,

Sorry to hear you still having trouble with upload issue. Please share your site login details in private reply to check this for you further.

April 28, 2014 at 6:27 pm 19529
Dan Dan

Hello Mahi

I have found the bug, it’s a bug with WP User Frontend Pro that you should fix. When generating the CSS ID of the form elements for the meta key, you’re not making the ID of the CSS URL safe (Use this: https://codex.wordpress.org/Function_Reference/sanitize_title). That means your javascript breaks when trying to find each upload tool because there are spaces in the CSS ID, which the jQuery selector cannot cope with.

Workaround: remove spaces from meta keys.

However, you should be cleaning this up in code, when generating the fields.

Regards
Dan

April 28, 2014 at 6:35 pm 19530
Tareq Hasan Tareq Hasan

Hello Dan,

We are assuming that the meta key is without space and alphanumeric, hiphen and underscore only, thats why it’s breaking. Of course it’s our fault, but using the safe meta key should fix the problem for now. We’ll improve on this.

May 8, 2014 at 9:06 am 20121
Pernes Pernes

Hello,

I have the same problem with the links href=”url/#”.
I understand a little of what the problem is but I don’t understand how to fix it.

Where and how remove spaces from meta keys ?

Thank you.
David.

May 12, 2014 at 10:23 pm 20352
nery nery

Hi Pernes, I guess its not the meta keys. Head over to the other topics “Image Insert / Image Upload Problem” and download the provided Javascript File. In addition, delete the minified (min.js) version of that file from your server, to make the replaced file work.

May 14, 2014 at 3:39 pm 20452
Pernes Pernes

Hello nery,

Thank you for your answer !
Yes, it was a problem of Javascript…

Works fine now !

Viewing 13 Posts - 1 through 13 (of 13 total)