WordPress.org

Ready to get started?Download WordPress

Forums

Can't Set Featured Image - Yes I Read All Other Posts (23 posts)

  1. HeatherFeuer
    Member
    Posted 1 year ago #

    I am a small webhost reseller and all my clients use WordPress as their CMS. All are on the same server with shared IPs. One client (the one most recently changed to WordPress) has a serious issue with setting featured images in posts, pages and any plugin that uses that feature. No matter what I have tried, I continually run into the exact same issue that appears to be somewhat unrelated to any other I have read.

    I have read through all the posts here, there and everywhere including StackExchange and Google to no avail. So far, this is what I have done:

    • Deactivated all plugins - No joy.
    • Installed the plugin to use Google's JQuery library - No joy.
    • Switched to the Twenty-Eleven theme - No joy.
    • White-listed the domain in mod_security - No joy.
    • I increased the memory limit to 128M - No joy.
    • Did a manual clean install of all the WordPress files from a freash download.

    When I try to set the featured image, Chrome shows the following:

    The "fb-root" div has not been created, auto-creating all.js:52
    POST http://www.salonoasis.biz/wp-admin/admin-ajax.php 404 (Not Found) jquery.js:8240
    send jquery.js:8240
    jQuery.extend.ajax jquery.js:7719
    jQuery.(anonymous function) jquery.js:7245
    NGGSetAsThumbnail media-upload.php:116
    onclick

    For the life of me, I can't figure out what it's not finding or why it's just this one client when other clients on the SAME server, with the SAME hosting account type using the SAME WordPress version do NOT have this problem! HELP! LOL

    The site in question is located at http://www.salonoasis.biz. Thank you!

  2. Shane Gowland
    Member
    Posted 1 year ago #

    Looks like a theme-specific issue. What theme is your client using?

  3. HeatherFeuer
    Member
    Posted 1 year ago #

    Item Three above. I switched to the Twenty-Eleven theme to make sure and still had the problem. The theme is a custom theme that I created myself and built on a skeleton of my own design for me to build client themes on.

    This skeleton is used with at least three other sites that do NOT have this problem.

  4. HeatherFeuer
    Member
    Posted 1 year ago #

    I apologize for my rather glib reply above. I started thinking about what you said and went back to my theme. I had enabled theme support in my functions file, however, I hadn't included the code in the loop to display the thumbnail in the post if one had been set. However, when I went back to the dashboard and tried to set a thumbnail, I still got a 404 on media-upload.php:116. When I clicked on the link to that part in Chrome's firbug window I got this code snippet:

    jQuery.post(ajaxurl, {
    			action:"ngg_set_post_thumbnail", post_id: post_id, thumbnail_id: id, cookie: encodeURIComponent(document.cookie)
    		}, function(str){
    			var win = window.dialogArguments || opener || parent || top;
    			$link.text( setPostThumbnailL10n.setThumbnail );
    			if ( str == '0' ) {
    				alert( setPostThumbnailL10n.error );
    			} else {
    				jQuery('a.ngg-post-thumbnail').show();
    				$link.text( setPostThumbnailL10n.done );
    				$link.fadeOut( 2000 );
    				// set some id as meta input filed
    				win.WPSetThumbnailID('ngg-' + id);
    				// replace the meta box with the image
    				win.WPSetThumbnailHTML(str);
    			}
    		}
    		);

    What am I missing?

  5. kcray85
    Member
    Posted 1 year ago #

    I am having the same issue with specific users. The only work around i have found is to change the users role to administrator. All of the other roles will show this same error. I am curious to hear if this solves your issue as well. Might be a bug in the user permissions.

  6. HeatherFeuer
    Member
    Posted 1 year ago #

    Actually, my client and I are the only users and we are both administrators. This site is being used as a CMS only. Sorry! I wish that would help!

  7. esmi
    Forum Moderator
    Posted 1 year ago #

    The second block of code that you posted above appears to be referencing a plugin - possibly NextGen.

  8. HeatherFeuer
    Member
    Posted 1 year ago #

    Yes, I was trying to set the image from a NextGen gallery. Here is the block of code throwing the 404 when trying to set the image from the Media Library:

    function WPSetAsThumbnail(c,b){var a=jQuery("a#wp-post-thumbnail-"+c);a.text(setPostThumbnailL10n.saving);jQuery.post(ajaxurl,{action:"set-post-thumbnail",post_id:post_id,thumbnail_id:c,_ajax_nonce:b,cookie:encodeURIComponent(document.cookie)},function(e){var d=window.dialogArguments||opener||parent||top;a.text(setPostThumbnailL10n.setThumbnail);if(e=="0"){alert(setPostThumbnailL10n.error)}else{jQuery("a.wp-post-thumbnail").show();a.text(setPostThumbnailL10n.done);a.fadeOut(2000);d.WPSetThumbnailID(c);d.WPSetThumbnailHTML(e)}})};

    And when I try to upload an image and set as thumbnail:

    function WPSetAsThumbnail(c,b){var a=jQuery("a#wp-post-thumbnail-"+c);a.text(setPostThumbnailL10n.saving);jQuery.post(ajaxurl,{action:"set-post-thumbnail",post_id:post_id,thumbnail_id:c,_ajax_nonce:b,cookie:encodeURIComponent(document.cookie)},function(e){var d=window.dialogArguments||opener||parent||top;a.text(setPostThumbnailL10n.setThumbnail);if(e=="0"){alert(setPostThumbnailL10n.error)}else{jQuery("a.wp-post-thumbnail").show();a.text(setPostThumbnailL10n.done);a.fadeOut(2000);d.WPSetThumbnailID(c);d.WPSetThumbnailHTML(e)}})};

  9. esmi
    Forum Moderator
    Posted 1 year ago #

    You really need to post this in the NextGens's dedicated forum (via its plugin page).

  10. HeatherFeuer
    Member
    Posted 1 year ago #

    Even though I disabled that plugin and STILL couldn't set the post thumbnail? I will, if you insist, but I really don't think the problem is the plugin. The problem is somewhere in the admin-ajax.php function calls.

  11. esmi
    Forum Moderator
    Posted 1 year ago #

    Try resetting the plugins folder by PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

  12. HeatherFeuer
    Member
    Posted 1 year ago #

    I just uninstalled the NextGen Gallery and optimized the database. I still get the same 404 error referencing set-post-thumbnail.js as shown above. Does that still mean that it's the plugin causing the problem?

  13. esmi
    Forum Moderator
    Posted 1 year ago #

    Did you try resetting the plugins as I suggested above?

  14. HeatherFeuer
    Member
    Posted 1 year ago #

    Yes. For this domain I am webhost, webmaster and one of two administrators. I have tried ALL suggestions. The database checks okay with both wp-optimize and from the CPanel MySQL Admin / phpmyadmin.

    I have WordPress 3.4.2 installed on at least eight other domains on the same server, several with the same skeletal base theme. In ALL other cases, I can set the post thumbnail and it will save properly. On THIS SITE ONLY, when I attempt to set the post thumbnail, it hangs on saving.

    This is why I am so incredibly frustrated!

  15. esmi
    Forum Moderator
    Posted 1 year ago #

    Site url?

  16. HeatherFeuer
    Member
    Posted 1 year ago #

    salonoasis.biz

  17. esmi
    Forum Moderator
    Posted 1 year ago #

    Can we see the site using the Twenty Eleven theme with all plugins deactivated?

  18. HeatherFeuer
    Member
    Posted 1 year ago #

    Theme twenty-eleven has been activated and ALL plugins deactivated.

  19. esmi
    Forum Moderator
    Posted 1 year ago #

    Re-upload a fresh, unpacked, copy of the Twenty Eleven folder to wp-content/themes using FTP or whatever file management application your host provides.
    http://wordpress.org/extend/themes/twentyeleven

    Then try to insert a featured image into a Post.

  20. HeatherFeuer
    Member
    Posted 1 year ago #

    Done.

  21. HeatherFeuer
    Member
    Posted 1 year ago #

    Tried to set featured image. Chrome's firebug shows:

    POST http://www.salonoasis.biz/wp-admin/admin-ajax.php 404 (Not Found) load-scripts.php:4
    send load-scripts.php:4
    f.extend.ajax load-scripts.php:4
    f.(anonymous function) load-scripts.php:4
    WPSetAsThumbnail load-scripts.php:6
    onclick media-upload.php:161

    And it hangs on saving.

  22. HeatherFeuer
    Member
    Posted 1 year ago #

    Update: Last night I completely deleted this account, then set it back up as a completely new account. I then created a brand new database, ftp'd a freshly downloaded copy of WordPress 3.4.2 and then installed it. Logged in to the dashboard. Tried to set the featured image in both a post and a page. *sigh*

    POST http://www.salonoasis.biz/wp-admin/admin-ajax.php 404 (Not Found) load-scripts.php:4
    send load-scripts.php:4
    f.extend.ajax load-scripts.php:4
    f.(anonymous function) load-scripts.php:4
    WPSetAsThumbnail load-scripts.php:6
    onclick media-upload.php:156
  23. storlihoel
    Member
    Posted 1 year ago #

    did you figure out a fix for this? I have the exact same problem. probably some issue with the theme I'm using.

Topic Closed

This topic has been closed to new replies.

About this Topic