• Hi,

    I am having issues with the latest version of Quick Cache Pro. It works great except when trying to upload media through the media upload page, I get the following error messages:

    Notice: Trying to get property of non-object in /Users/adamboother/sites/isis-wp/wp-content/plugins/quick-cache-pro/quick-cache-pro.inc.php on line 2343

    Notice: Trying to get property of non-object in /Users/adamboother/sites/isis-wp/wp-content/plugins/quick-cache-pro/quick-cache-pro.inc.php on line 2345

    Notice: Trying to get property of non-object in /Users/adamboother/sites/isis-wp/wp-content/plugins/quick-cache-pro/quick-cache-pro.inc.php on line 2347

    Notice: Trying to get property of non-object in /Users/adamboother/sites/isis-wp/wp-content/plugins/quick-cache-pro/quick-cache-pro.inc.php on line 2347
    7673

    This then prevents me from being able to upload the media. I am using PHP version 5.5.10 on MAMP. Are you aware of any issues with this?

    Cheers.

    https://www.ads-software.com/plugins/quick-cache/

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author Raam Dev

    (@raamdev)

    Hello,

    That’s really strange. I just tried to reproduce this on a clean installation of WordPress (no other plugins except Quick Cache and running the default TwentyFourteen theme) and I did not get any such Notice from PHP when I uploaded content via the Media Library.

    It’s possible there’s something about your specific configuration (plugins/themes/custom-post-types) that is introducing a bug somewhere. Can you try reproducing this problem on a clean installation of WordPress?

    Thread Starter aboother

    (@aboother)

    Hi,

    I tried reproducing this error on a clean install as you suggested, and couldn’t replicate the issue either. I then tried de-activating and activating my plugins on my site one-by-one and figured out the error only happens when you have the ‘Enhanced Media Library’ plugin also enabled. Unfortunately my site relies on the ‘Enhanced Media Library’ plugin quite highly, do you think you could get Quick Cache Pro working with this plugin?

    Cheers.

    webbistro

    (@webbistro)

    Hello,

    I am the author of the Enhanced Media Library. Unfortunately I don’t have a pro version of the Quick Cache, so I can’t check the problem, but you can rely on my assistance if some actions are required from me to fix this.

    -Nadia

    Plugin Author Raam Dev

    (@raamdev)

    Nadia,

    If you could please test with Quick Cache Lite (available here on www.ads-software.com), that would be great. The code that is throwing the PHP Notices for @aboother also exists within the Lite version, so the Pro version should not be necessary to test this issue against your plugin.

    webbistro

    (@webbistro)

    Hello,

    I tested EML 1.1.2 + WordPress 4.0 + Twenty Fourteen 1.2 + Quick Cache 141001. Uploaded images in all possible ways: Media -> Add New, Grid View, and page Media Popup without any error.

    What is in that code? I don’t have any information which line in which file can cause this in the Lite version.

    -Nadia

    webbistro

    (@webbistro)

    Also, it is NOT an error, it is just a notice… How is it preventing from ‘being able to upload’?

    Thread Starter aboother

    (@aboother)

    Hi,

    The error/notice message I get is above, I will paste it again for you:

    Notice: Trying to get property of non-object in /Users/adamboother/sites/isis-wp/wp-content/plugins/quick-cache-pro/quick-cache-pro.inc.php on line 2343

    Notice: Trying to get property of non-object in /Users/adamboother/sites/isis-wp/wp-content/plugins/quick-cache-pro/quick-cache-pro.inc.php on line 2345

    Notice: Trying to get property of non-object in /Users/adamboother/sites/isis-wp/wp-content/plugins/quick-cache-pro/quick-cache-pro.inc.php on line 2347

    Notice: Trying to get property of non-object in /Users/adamboother/sites/isis-wp/wp-content/plugins/quick-cache-pro/quick-cache-pro.inc.php on line 2347
    7673

    That then prevents the media item from uploading, as in the media does not upload…the message appears and nothing then happens. This happens when trying to upload media by clicking ‘media’ in the left hand sidebar and then ‘add new’.

    webbistro

    (@webbistro)

    Hi @aboother,

    Thanks for information.

    I can’t check PRO file you mentioned because what I have is just Lite version. It was a question for Raam Dev.

    Also, the current version of EML actually doesn’t work with ‘add new’ media page at all. But the next version 2.0 (unlaunched yet) does. So, I’d like to get the issue.

    -Nadia

    webbistro

    (@webbistro)

    And… sorry, I misread what you wrote about ‘add new’. Can you please post a screenshot to make sure which page you mean.

    webbistro

    (@webbistro)

    Hello again,

    I have tested it more carefully and figured out that:

    1. I am able to reproduce the similar problem – WP error “An error occurred in the upload. Please try again later.” during images uploading, but

    2. despite showing an error the images have been actually uploaded

    3. the error appears because of the following code in EML:

    add_action('init', 'test_attachment_taxonomy');
    
    function test_attachment_taxonomy()
    {
        register_taxonomy(
            'test_media_cat',
            'attachment',
            array(
                'public' => true,
                'show_admin_column' => 1,
                'show_in_nav_menus' => 1,
                'hierarchical' => 1,
                'update_count_callback' => '_update_generic_term_count',
                'sort' => 0,
                'rewrite' => array( 'slug' => 'test_media_cat' )
            )
        );
    }

    The code was simplified a bit for testing purposes, but it reproduces the same problem.

    I can’t solve this because there is nothing to solve from my side. I have to register attachment taxonomies, it’s my plugin’s main feature.

    4. Also, I tried to install another plugin Media Library Assistant, which registers attachment taxonomies as well, and got the same WP error during images uploading. So, I assume that Quick Cache may be not working with custom attachment taxonomies.

    Hope this helps to solve the issue.

    -Nadia

    Plugin Author Raam Dev

    (@raamdev)

    @nadia I just attempted to reproduce this by registering the exact same taxonomy (copied your code) and I was unable to reproduce the problem. After registering that taxonomy, I’m able to upload files via the Media Library just fine, with no errors.

    Can you please provide me with a few more details about how you ran the test? Were you using the default TwentyThirteen or TwentyFourteen theme? How exactly did you upload the files? Directly through the Media Library (Media → Add New) or were you uploading them when editing a post? Are you able to reproduce this with no other plugins running except Quick Cache?

    webbistro

    (@webbistro)

    Hi Raam Dev,

    The thing is that I didn’t see any error either before some point. It seems that I saw an error first time after RE-saving Quick Cache settings. But I am not sure.

    Right now I deactivated all plugins except Quick Cache and just added the code from my previous comment to functions.php and still get the error. It looks like this. If I delete the code, the error goes away.

    Quick Cache message at the top I see first time. It appeared after browser cache cleaning. I clean browser cache every time I change something in code.

    I am using:

    1. Media Library page in Grid view, uploading images with drag-n-drop, that is ‘Directly through the Media Library (Media → Add New)’

    2. WordPress 4.0

    3. Theme Twenty Fourteen 1.2

    4. Quick Cache 141001

    webbistro

    (@webbistro)

    I just deleted database and tried all the same with a virgin installation (just in case).

    1. activated Quick Cache,

    2. went to its settings and enabled it

    3. added the code registering attachment taxonomy to functions.php

    4. got an error when uploading (but images actually have been uploaded)

    5. removed taxonomy code

    6. cleaned browser cache

    7. uploaded images without any error

    Plugin Author Raam Dev

    (@raamdev)

    @webbistro I see you were testing with an older version of Quick Cache (v141001). Can you please update to the latest release (v141110) and test again? I was testing against v141110 and was not able to reproduce the error as you describe.

    webbistro

    (@webbistro)

    Hello,

    I checked the issue after Quick Cache latest upgrade, to no avail, unfortunately.

    -Nadia

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘'Trying to get property of non-object in…' error when uploading media’ is closed to new replies.