adding image to pending listing not working


  • Mitchell
    Senior Member 165 points
    May 22, 2020 at 3:12 pm

    on a Pending listing, I tried to add a screenshot image. when trying to add the image either upload or add from the library then insert into post nothing happens and it just sits there.
    I have these plugins active:
    Classic Editor
    Color My Posts
    Contact Form 7
    Elementor
    Loco Translate
    Redirection
    Smush Pro
    Wordfence Security
    WPBruiser
    WPBruiser – ContactForm7
    WPMU DEV Dashboard
    WPS Hide Login Settings
    Yoast SEO

    I disabled all but Classic Editor and Elementor still don’t insert image.
    I even removed the original image and tried to import the new one didn’t work.
    Mitch

    Attachments:
    You must be logged in to view attached files.
  • JamesD
    JamesD
    Super Guru 1,722 points
    May 22, 2020 at 9:57 pm

    Hello Mitchell,

    I’d recommend turning on the WP_DEBUG/WP_DEBUG_LOG in your wp-config.php file.

    To turn on WP debugging, open the wp-config.php file and look for define(‘WP_DEBUG’, false).
    If you have it there already, then make sure it’s set to true.

    If it’s not in the file then

    add define('WP_DEBUG', true);
    add define('WP_DEBUG_LOG', true);

    right above the /* That’s all, stop editing! Happy blogging. */ line.

    Once you’re done with that go through the motions that cause the error. The page should tell you exactly where any problems are. This will also create a log file located /wp-content/debug.log. The same error info from the page will also be stored in the log file.

    Once you’ve have the info you need you can turn those settings OFF or remove them altogether.


  • Mitchell
    Senior Member 165 points
    May 22, 2020 at 10:42 pm

    Thanks, James you and Marie are the only one that has really helped me and I Thank You if it was not for you I would be looking for a new theme.
    that said, stepping down from my Pissed off soapbox.

    I did ask asked and did not see a debug file. then I went to click update for the hell of it even though the insert into post didn’t work and got an error on a new page.
    But no debug file.

    Notice: Undefined variable: file in /home/xxxx/public_html/wp-content/themes/DT9/framework/new_class/class_admin_design.php on line 591

    Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/public_html/wp-content/themes/DT9/framework/new_class/class_admin_design.php:591) in /home/xxxx/public_html/wp-admin/post.php on line 231

    Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/public_html/wp-content/themes/DT9/framework/new_class/class_admin_design.php:591) in /home/xxxx/public_html/wp-includes/pluggable.php on line 1281

    Warning: Cannot modify header information - headers already sent by (output started at /home/XXXX/public_html/wp-content/themes/DT9/framework/new_class/class_admin_design.php:591) in /home/XXXX/public_html/wp-includes/pluggable.php on line 1284

  • JamesD
    JamesD
    Super Guru 1,722 points
    May 22, 2020 at 10:47 pm

    Hey Mitchell,

    Those messages aren’t really helpful, was there more to it?
    If so, can you take a screenshot?

    Also, is it safe to assume you put in the add define('WP_DEBUG_LOG', true); line too?


  • Mitchell
    Senior Member 165 points
    May 22, 2020 at 10:50 pm

    no that was it
    and yes added
    define(‘WP_DEBUG’, true);
    define(‘WP_DEBUG_LOG’, true);

  • JamesD
    JamesD
    Super Guru 1,722 points
    May 22, 2020 at 10:50 pm

    You can try replacing the line #591 it references in the /DT9/framework/new_class/class_admin_design.php file.

    if(isset($file['id']) && get_the_post_thumbnail_url($file['id']) != ""){

    Edited: Sorry, the above line is what you want to replace the current line with.


  • Mitchell
    Senior Member 165 points
    May 22, 2020 at 11:05 pm

    Hi james
    Line 591 is

    if(get_the_post_thumbnail_url($file['id']) != ""){
    $thumb = wp_get_attachment_thumb_url( $_POST['gallery']['image_aid'][ $i ] );
    }

    do you want me to replace it all with this

    if(isset($file['id']) && get_the_post_thumbnail_url($file['id']) != ""){


  • Mitchell
    Senior Member 165 points
    May 22, 2020 at 11:14 pm

    Going to eat dinner check back much later or tomorrow
    Thanks for the help

  • JamesD
    JamesD
    Super Guru 1,722 points
    May 23, 2020 at 2:48 am

    @Mitchell

    I ran across a similar issue in a v9.2.7 theme. The error I’m getting appears to be javascript based.

    It’s just a workaround and I know it’s not ideal, but you could try to copy/paste the image url and save instead of selecting with the media.

  • JamesD
    JamesD
    Super Guru 1,722 points
    May 23, 2020 at 6:14 am

    @Mitchell

    As I stated I have a similar issue, but it’s v9.2.7 (SO9). I’ve found and resolved the issue I had. It’s in the /framework/new_class/class_admin_design.php file.

    I’ll make the change and give you the file if you want.

    Which DT version are you using?


  • Mitchell
    Senior Member 165 points
    May 23, 2020 at 11:32 am

    Thanks james

    Version 9.4.3

    Mitch

  • JamesD
    JamesD
    Super Guru 1,722 points
    May 24, 2020 at 12:03 am

    @Mitchell

    I have a copy of the original file as well as the corrected file in the attachment.

    Upload the class_admin_design.php file into the /DT/framework/new_class directory. Either rename or overwrite the current file there.

    There are a few differences between the 9.2.7 & 9.4.3 files, but if it’s the same issue then the changes should still work.

    Please let me know how it went. Thanks.

    Attachments:
    You must be logged in to view attached files.

  • Mitchell
    Senior Member 165 points
    May 24, 2020 at 7:47 am

    No Didn’t work
    Even tried to paste image URL and update didn’t save

    Mitch


  • Mitchell
    Senior Member 165 points
    May 24, 2020 at 3:22 pm

    Hi James
    I’m currently looking into another Directory. So thank you for all you have done for me. It’s very hard for someone that doesn’t code to fix these things for themself
    So again thank you so much.

    Premiumpress still has not answered my Tickets dating back a year ago and the resent one from a week ago.

    Now All my Themes will be up for sale. $75 takes them all

    Classifieds Theme – (Version 9)
    Directory Theme (Version 9)
    Coupon Theme (Version 9)
    Video Theme (Version 9)

  • Alex Morgan
    Alex Morgan
    Super Guru 1,146 points
    May 28, 2020 at 1:01 pm

    Hi Mitch

    when you attach the image, there is an option there for URL, click in NONE http://prntscr.com/spfcxs then Insert into post.

    it should attach just fine

Viewing 15 posts - 1 through 15 (of 15 total)

New Business Themes for WordPress 2020

Start your new website today!

View Business Themes