• Resolved thisissparta

    (@thisissparta)


    Hi there,
    So I’ve used Option Tree all week, working on a new site. Uploading images has been and works fine in the header and homepage options.

    My problem is just in the past couple of hours, I upload an image using the WP uploader while in Option tree, trying to change the header or footer image. The upload works fine, but when I choose “Insert into Post” Option Tree turns white and nothing happens. I tried it in Chrome and Firefox. Also, it worked a few hours ago, but seems to have stopped working.

    Does anyone know what’s going on? I tried deactivated/reactivating the plugin as well, but it didn’t change anything.

    Any info or advice would be greatly appreciated.

    Thanks : )

Viewing 15 replies - 16 through 30 (of 38 total)
  • Glad to see that this issue is getting some assistance.

    I ended up replacing the logo images (with new ones of the same name) that were already called for in the OptionTree theme install folders. Not ideal, but I had no other way to replace the logo and had to complete the site.

    In my case, everything else was working fine in the OptionTree plugin, with the exception of the General pane. It was hanging up on the image load for logo and favicon every single time. The images are loading and appear in the gallery, but will not ‘insert into post’. I even tried your typed in URL suggestion, but to no avail.

    I even tried working with various browsers like Google Chrome, Firefox and Safari, with no luck.

    As I mentioned before, I use the same theme and plugin setup on three other sites and none of them have this problem. I even thought that with the recent OptionTree update (1.1.8) that the problem would be resolved, but it has not.

    Yea I’m not sure how to react either as it’s clearly not my setup alone, there are others with this issue, it isn’t browser specific it seems, it isn’t in the last update and it seems to be intermittent? One minute all is working fine and the next it starts hanging.

    If this doesn’t work I have no choice but to user another theme. This project is already getting delayed. Well hopefully something comes of this, Derek did a good job setting it up so let’s hope he finds a way to fix it.

    It’s an awesome concept and plugin when everything is working properly. I love it. No issues there.

    But, it does knock out using specific themes that have this plugin as a backbone. Hope this gets resolved.

    Good morning/afternoon/evening.

    How is all going, has anything further come from this Derek? Hopefully some progress, if you have not had a chance to look at it, that’s fine but I would just like to be up to date with how it all is?

    Please could you let me know, I have a small window left for me to get a refund for the theme if this cannot be fixed anytime soon, I understand you might have a lot to do so please just an update will do ??

    Thank you

    Hello, i am not sure this is the same bug i was experiencing so let me explain what happened to me first…

    – Uploading an image with optiontree upload’s field and clicking ‘add to option tree’ would work fine but when trying to refresh…

    – Optiontree would hung up and try to load the image for a very long time and finally hung up without displaying the image or the remaining options. Same thing no matter how many refreshes.

    – This only happened in my local testing enviroment using xampp and https://localhost/mysite as the url. Testing in a real site with proper domain name was working fine.

    So… after some digging in the source files of the plugin and google, i found that the problem was that getimagesize function works more reliably if given a path instead of url. I also found that for ‘some reason’ localhost may not resolve correctly to ‘127.0.0.1’ inside a getimagesize function call.

    The permanent solution is if valendesigns updates his plugin to store the local absolute path to the image instead of the url. That way getimagesize will not fail in localhost urls.

    Another quick and dirty “hack” is to change your site url to https://127.0.0.1/mysite instead of https://localhost/mysite.

    Here are some relevant links:

    https://www.sitepoint.com/forums/showthread.php?529312-getimagesize()-filename-URL

    https://cameronpreston.com/development/getimagesize-on-a-wp_get_attachment_image_src/

    hi there,
    am having exactly the same problems working locally, and the quick and dirty hack (above) doesnt work for me either.
    are there any other solutions. or is there a fix in the pipeline for option tree.
    thanks

    Hi bbrt, when i say to change the site url i also mean to change it in the database but i haven’t tried this myself. What i have tried and worked though, is to modify the file upload.php located at: wp-content\plugins\option-tree\functions\admin

    Inside the file, find the following line:

    <?php if ( is_array( @getimagesize( $settings[$value->item_id] ) ) ) { ?>

    And replace it with this:

    <?php
            $settings[$value->item_id] = str_replace('localhost', '127.0.0.1', $settings[$value->item_id]);
            if ( is_array( @getimagesize( $settings[$value->item_id] ) ) ) { ?>

    It worked fine for me and (theoretically) will not cause any problems even when you publish to a live site, because it modifies the image path only if localhost is fouund inside it.

    Of course this not a real solution but a ‘hack’.

    Anyway try it and let me now if it worked.

    hi fractalbit,
    thanks for your time. I have tried your hack and the option tree image loading still hangs for me.
    Am using a commercial theme that makes heavy usage of option tree and I can’t develop locally?

    Weird, maybe localhost in your system is cofigured in different IP and not 127.0.0.1?

    I should note, that these should “fix” the admin area only, not the theme for the frontend that may also use the getimagesize function.

    Or maybe it is a different proplem in your case?

    I am experiencing this problem where the screen goes blank after clicking on “Add to Option Tree”

    Tried fractalbit’s hack with server’s IP address and unfortunately did not work.

    Any help would be appreciated.

    Help! I’m experiencing this problem also!

    Hi everyone!

    I fixed this by manually populating the file url in the link url area of the Add media files from your computer area.

    I’ve done the same! I wouldn’t say that’s necessarily a fix but, it certainly is a good work around.

    Hi!, has anyone found a solution to this problem ??.
    I need my client to be able to upload images with the usual administrator, not FTP uploads, and copypaste of links…
    I’ve started to have this problem a few hours ago…

    Thanks !!

    Hate to throw this out there… But maybe using a different piece of software would be a good idea…

    https://upthemes.com/upthemes-framework/

    This is a better options framework anyway ??

Viewing 15 replies - 16 through 30 (of 38 total)
  • The topic ‘Upload Image, Makes Option Tree Go Blank’ is closed to new replies.