Forum

Thread tagged as: Question, Runway, Blog

Blog import slug (postSlug) issue

I'm importing a weblog driven by Movable Type via WordPress to Perch Runway Blog app. Overall, the import works fine. All entries are successfully created, alongside with their meta info (date, author, categories, tags and comments).

The only issue I am having is that the postSlug format doesn't seem to be respected at import time.

I installed a frech copy of Runway, installed the Blog app, configured the 'Blog post page path' and 'Slug format' in order to meet the current scheme, and added a 'blogslug' route to runway.php

The scheme I am trying to match is

Blog post page path /logs/{postSlug}

Slug format %Y/%m/{postTitle}

The setup works fine with new posts (the correct postSlugis generated), but the imported posts all have their 'postSlug' field set to {postTitle} only. Nevertheless, editing an imported post changes the postSlug to the desired format.

My question is the following:

  • Is there a way to generate the correct postSlug during import ?
  • If not, is there a way to rebuild all posts, similar to the page republish function ? (I tried /perch/addons/apps/perch_blog/update/, all posts were processed, but it didn't change anything.)

If not, I guess I'll run a script to modify the entries in the perch3_blog_posts and perch3_blog_index tables.

Happy New Year to all, and thanks for reading.

Summary information

Perch Runway: 3.1.3, PHP: 7.1.24, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $, with PDO
Server OS: Linux, fpm-fcgi
Installed apps: content (3.1.3), assets (3.1.3), categories (3.1.3), perch_blog (5.6.1)
App runtimes: <?php $apps_list = array( 'perch_blog', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/clients/99e12c480b346ec84343a6e460d0caf0/dev.davidroessli.com/html/perch
PERCH_CORE: /home/clients/99e12c480b346ec84343a6e460d0caf0/dev.davidroessli.com/html/perch/core
PERCH_RESFILEPATH: /home/clients/99e12c480b346ec84343a6e460d0caf0/dev.davidroessli.com/html/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 300M, Max POST 300M, Memory: 640M, Total max file upload: 300M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/
DOCUMENT_ROOT: /home/clients/99e12c480b346ec84343a6e460d0caf0/dev.davidroessli.com/html
HTTP_HOST: dev.davidroessli.com
David Roessli

David Roessli 0 points

  • 2 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Which method are you using to import your posts?

I used the WordPress importer as described in https://docs.grabaperch.com/addons/blog/importing/#wordpress

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is it definitely coming through with just the title as the slug, not as a combination of the post date and the title?

Yes, postSlug contains just the title.

Table 'blog_posts' table blog_posts

Table 'blog_index' table blog_index

Table 'blog_posts' (once edited the postSlug value is correct) table blog_posts

Is it safe to run an SQL query to just update all postSlug fields in tables 'blog_posts' and 'blog_index' ?
Or must I update something else ?