Support » Plugin: WP Document Revisions » [Plugin: WP Document Revisions] Bulk Imported files have broken permalinks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Bump!

    In case it wasn’t clear, when I said above that “Uploading a new version fixes it”, I meant that for any document with a broken permalink, if I upload a new version of the document through the admin, it fixes the link, but obviously that isn’t much use with a bulk importer.

    The way the importer is written, it implies that the documents folder for import can be anywhere. Is that the case? In general it would be helpful to have a bit more info on what conditions are required for the bulk importer to work.

    OK, some more info on this:

    If I set the post status to ‘public’ in the importer, the result is a bit strange too – the posts don’t show up anywhere in the dashboard, but the number of posts under ‘All’ in the post counter continues to rise by the number of documents found by the importer. Basically, the importer seems to be capable of creating posts in the database to which there is no interface in wordpress – no way to view them and no way to delete them.

    I’d really appreciate some help with this. I have to get this working for a client who has over 300 documents to set up, and obviously doing that manually for each one would take a lot of time. I am simply using the bulk importer as is, only changing the paths apart from that one experiment with the post status.

    One more try…

    One thing the bulk uploader does not do, which the main plugin does, is hash the file and put it in the uploads/yyyy/MM/ directory, and I think this is the main issue.

    The bulk uploader script uses the following functions on the files it finds:

    • wp_insert_post
    • wp_set_post_terms
    • wp_check_filetype
    • wp_insert_attachment
    • wp_update_post

    None of these will move the file to the correct place and hash it in the same way that the admin interface version does. Functions like filename_rewrite and rewrite_file_url are integrated into the wp_handle_upload process using ‘add_filter’, but don’t get a lookin in the bulk import version, so the plugin can’t serve the files properly.

    Any chance of a working version of the bulk importer? I am using this plugin because of the response in this thread: but as far as I can tell it cannot work in its current form.

    Plugin Author Ben Balter


    The simplest bulk import would be to move the files into the uploads folder. The bulk importer, as written, does not move files from their original location. This functionality could be added and I would gladly accept a pull request.

    The reason documents can be anywhere at the time of import is because the document upload folder can live anywhere (it does not have to be /wp-content/uploads/). This setting is set on the media page.

    To debug this issue further, please check your PHP error log, which should have more detailed diagnostic information.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WP Document Revisions] Bulk Imported files have broken permalinks’ is closed to new replies.