Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter onebc

    (@onebc)

    Cool. Thanks for the response. 🙂

    I’ve had this issue for the past 24 hours after upgrading from 4.0.x to 4.1.x. Turns out it was a very simple fix so I thought I’d post back here in case it helps anyone else.

    I was getting the same HTTP Error as discussed here and tried some of the suggestions here to no avail. However, upon investigating I discovered that the permissions on the file /wp-admin/async-upload.php were set incorrectly to 777. Upon changing the permissions to 644, the uploading worked again immediately.

    I suspect this occurred because I was using FS_DIRECT in my wp-config with 777 permissions, and therefore when the file was updated it’s permissions were changed to an admittedly poor security level.

    Turns out my above logic was wrong. I was still in the position where importing worked manually but not for auto-imports. Whether this is related to WP Cron, permissions, etc. I have no idea but I can’t crack it and can’t spend any longer on it.

    Instead therefore I’ve now amended the plugin code (not a very clever idea) to update the Post Format after the post is created rather than when it is created. It probably incurs a extra DB hit and the change would have to be re-applied if the plugin were updated but in case it helps anyone else, here’s what I added to line 303 of import.php:

    // Post format - updating post with format after initial post creation
    // because method above on line 293 fails for auto-import in some circumstances
    if ( 'standard' != $ozh_ta['post_format'] ) {
      set_post_format($post_id, $ozh_ta['post_format']);
    }

    I also struggled with this one for quite a while but I have just realised the likely solution – which is not a bug in the plugin code but rather with WP user capabilities…

    1. Firstly, make sure you’re running the latest version because the Post Format import did have an issue before the release in Sept ’14 (see the GitHub thread at https://github.com/ozh/ozh-tweet-archiver/issues/5 for more info).

    2. If you’re still having an issue then there’s a strong chance it’s related to the user you’re using during auto-import. I couldn’t understand why Post Format was being assigned correctly when I did a manual import but not when I did an auto import. The WordPress documentation at http://codex.wordpress.org/Function_Reference/wp_insert_post#Parameters states

    ‘tax_input’: Equivalent to calling wp_set_post_terms() for each custom taxonomy in the array. If the current user doesn’t have the capability to work a taxonomy, the you must use wp_set_object_terms() instead.

    Tweet Archiver uses the tax_input method above and therefore effectively uses wp_set_post_terms(), so if the user you have set to use for all the Auto Import posts doesn’t have the correct capabilities there’s a strong chance that the Post insertion will work but not the Post Format – the outcome being what you’re seeing. I’m assuming that when doing a manual import the capabilities are taken from the currently logged in user rather than the user you have set in Tweet Archiver settings.

    Note: All the above is theory at the moment but I’m eagerly awaiting my next ‘auto import’ (now using a user with Admin privileges) and then I’ll know for sure if my theory is correct. 🙂

    Yeah, same here. OSX 10.6.2. WP 2.9.2. Real pain in the ass. Come on support dudes!

    Thread Starter onebc

    (@onebc)

    Ah, nice one… i’m guessing pingomatic was the cause for me too as all my blogs appear to have sorted themselves out now. In future though I’ll be removing the pingomatic plugin instantly if it happens again.

    Thanks for the tip jchausse – it’s good to know something is fixed but far better to know why. 🙂

    Hi.
    There is a work-around to the category date display issue [that I’ve just found whilst building a template for my new blog which is only half way through so don’t be shocked if it breaks at the moment!!!].

    Anyway, the work around, is to use php AFTER the wordpress functions have done their bit. Using php’s date functions you can pretty much turn any date format into another format. You wouldn’t want to do this on huge number’s of dates but for a straightforward archive list I guess it’ll largely be ok.

    So, in get_archives I added after the line where $text is set…
    $newText = date("M y", strtotime($text));
    to change the standard archive link format [January 2006] to my preferred compact format [Jan 06].

    HTH.

    Ben

Viewing 7 replies - 1 through 7 (of 7 total)