adrian

Migrator

Recommended Posts

@MilenKo

Ok, just committed new versions of Migrator and also MigratorWordpress so be sure to update both. Comment dates now working and also fixed an issue with comment status from last commit.

I'll look into the comments/tags and homepage issue tomorrow - gotta run :)

  • Like 2

Share this post


Link to post
Share on other sites

No worries @adrian Anything I can help - shoot straight. Helping one is helping the rest so I am sure the gratefulness is to follow. Especially when it is supported with the latest versions etc.

  • Like 2

Share this post


Link to post
Share on other sites

@adrian it might worth to mention here, that my exported fiile could be messed up due to the several themes installed during the last 5-6 years of the site existence so if something does not work at 100% I would try to use another XML export to make sure it is working fine. Once you are ready with the latest version, I will proceed to test it with my export and another from demo WP.

Share this post


Link to post
Share on other sites

@adrian not to be rushing you but do you have any updates on the Migrator to test?

Nevermind, I should have checked the GitHub before asking. I will test it and get back to you with the results. Thanks for the update.

Share this post


Link to post
Share on other sites

Ok. I installed the migrator and tested the latest version of MigratorWordpress. Pushed the XML file that I sent you earlier and with 2 timeouts everything got imported. Here are the results:

1. Home page title has been changed to one of the imported (just the name changes, but the properties are OK so it is easy to fix by renaming the page back to Home).

2. Comments date is still imported improperly (PENDING: Comment #22 Posted 10 minutes ago by Maria appears in the comment edit field).

3. Tags page is created in the import parent page as a separate child, however there are no Tags child pages imported from the wordpress tags.

I will try later to import the pages with comments and approve them by applying the proper templates etc. so that I can check if on the frontend the date would change or would be the one shown  in the admin (10 minutes ago). Once I am done with the test, will report back.

Share this post


Link to post
Share on other sites

Hi @MilenKo - sorry for the silence of late - too much going on here. I just pushed some changes I made earlier in the week that should fix the comment datetime issues.

When I get some more this week I'll take another look at the tags issue.

Thanks for your patience!

Share this post


Link to post
Share on other sites

Heh, no worries at all @adrian It is perfectly clear that your efforts are put of a good will and you have definitely helped a lot already so no need to apologize for anything. I just saw that MigratorWordpress has been updated 7 days ago and thought I missed your update. Will test the import once I get back toy place tonight and let you know how it works. So far, the only "issue" I had with the importer are the comment dates as I am certain I did not tag the recipes properly and want to edit each one to achieve my new strategy. But hey, no rush at all, OK?

 

 

Share this post


Link to post
Share on other sites

@adrian I have just ran the test again this morning using your latest update from GitHub and was super happy to find out that the posts import went OK and the comments time stamp is perfectly matching the original.

The rest (tags, fields etc.) are not imported, but as I mentioned earlier I do not mind fixing them myself as I need to do a lot of crap cleanup beyond the scope of this topic and not related to the module import.

So for now I am totally good to start my work and move the posts to their new home so THANK YOU! 

If you ever need me to test an import or else, I have my local copy set so I can always run it again and again.

For anyone dealing with a migration like mine, feel free to work on your PW Profile (appearance, functionality) then import the WP content to a newly created page of your choice. Once this is done all you have to do is to make sure that the fields in the imported pages are matching the ones in the template you are going to assign the posts to. In my case initially I have imported 600 cooking recipes but the original profile did not contain the comments module yet. So after the import and assigning the imported posts to the recipe template, I lost my comments. To make it work, all I had to do was to assign the comments field to my recipes template and only after that to start changing the imported pages one. Voila, I am now off the WP for good and the work continues.

Share this post


Link to post
Share on other sites

@adrianI am coming back with a little issue/question for the importer. After finishing the process I noticed that there is a field called date where the importer adds the post publishing date. So do you know if I delete the field the proper timestamp of the post will be kept?

Share this post


Link to post
Share on other sites
On 3/26/2017 at 2:11 PM, MilenKo said:

@adrianI am coming back with a little issue/question for the importer. After finishing the process I noticed that there is a field called date where the importer adds the post publishing date. So do you know if I delete the field the proper timestamp of the post will be kept?

When Migrator and MigratorWordpress were written, there was no system "published" field in Processwire. There is now, so I just pushed updates to both modules to support writing to that system field. Unfortunately untested at the moment (no time today), but hopefully will work as expected.

With that in place, you should be able to delete that "date" field if you wish and use the "published" field to get the same information.

Cheers,
Adrian

  • Like 2

Share this post


Link to post
Share on other sites

@adrian I am almost done with the website main html so will start this week/weekend to turn it into the theme I need. Once I star, I will delete from one post the Posted field and see if the date is preserved and what is more important - if it is the correct one. So we will know soon how would that work ;)

Share this post


Link to post
Share on other sites

I'm just trying the module. Thanks for the awesome tool. I tried to import the files.zip with edit imported content option after, but after some time I get a error "Missing required ZIP or JSON Source" and nothing has changed.

After trying again without the option to edit, the pages are all flat imported under home instead of creating the structure. 

Edit: Every page in the json has: parent_name: "/"

Share this post


Link to post
Share on other sites

Ah yes. No problem, I found the issue. My older Multisite module, which was hooking and altering page paths is the problem. Thats why I removed it from Multisite.

Share this post


Link to post
Share on other sites

Hey Guys, I have setup a new Processwire site which was originally a Wordpress site. I was able to successfully migrate the blog using the WordPress Migrator module. 

However, I am running into an issue. I am having trouble migrating only the WordPress pages. 

I can export from WordPress and import into Processwire under the correct section. 

The issue I am having is when I import the WordPress XML. It populates the new pages under the correct section but doesn't use the correct template i indicated which is landing-pages. Instead, it creates a new template called Blog Basic Page. 

Any light on this guys?

Share this post


Link to post
Share on other sites

Hi @quickjeff - did you set the template details on the config page of the MigratorWordpress module?

It looks like even though it should use the template you defined, it will use "Basic Blog Page" as the label for the template - see here: https://github.com/adrianbj/MigratorWordpress/blob/fa8c54485f230db39c7fb5f5a42c6f1b5a3d27a9/MigratorWordpress.module#L279

Maybe it's not possible to use existing templates with the MigratorWordpress module - I need to check more thoroughly to confirm. If that's the case, it should be an easy fix though.

 

Share this post


Link to post
Share on other sites
48 minutes ago, adrian said:

Hi @quickjeff - did you set the template details on the config page of the MigratorWordpress module?

It looks like even though it should use the template you defined, it will use "Basic Blog Page" as the label for the template - see here: https://github.com/adrianbj/MigratorWordpress/blob/fa8c54485f230db39c7fb5f5a42c6f1b5a3d27a9/MigratorWordpress.module#L279

Maybe it's not possible to use existing templates with the MigratorWordpress module - I need to check more thoroughly to confirm. If that's the case, it should be an easy fix though.

 

Right, I caught this also when browsing where it was being created, I may need to strip this and simply use my existing template. 

Share this post


Link to post
Share on other sites
25 minutes ago, quickjeff said:

Right, I caught this also when browsing where it was being created, I may need to strip this and simply use my existing template. 

It should be easy to modify it so that if a template (defined by the user in the module settings) already exists to use it.

If you send a PR directly to the main repo (Nicos), I can merge it for you.

Share this post


Link to post
Share on other sites
22 minutes ago, adrian said:

It should be easy to modify it so that if a template (defined by the user in the module settings) already exists to use it.

If you send a PR directly to the main repo (Nicos), I can merge it for you.

Was hoping for a quick solution but might have to rewrite some of this module to use a defined template. Might take a stab at it tonight. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By FrancisChung
      Hi,
      I was wondering if anyone knew what this did? 

      If so, do you know what modules it actually impacts? Is there another log that lists the action it took?

      I'm having some weird problems with PHP duplicate declaration per link below, since this module was run.
       
       
    • By tpr
      AdminOnSteroids
      Various admin tweaks to enhance ProcessWire admin.
      http://modules.processwire.com/modules/admin-on-steroids/
      https://github.com/rolandtoth/AdminOnSteroids

    • By Macrura
      Field Descriptions Extended
      This module enables you to extend field descriptions by dividing short descriptions with a longer text that is revealed in a toggle.
      Github: https://github.com/outflux3/FieldDescriptionsExtended
      Extending your field descriptions using the standard field's description field.
      Once this module is installed, it will automatically search your description field for the presence of 5 dashes (-----).
      Any content above the 5 dashes will be visible and the content below the dashes will be hidden. A 'More...' link will appear at the end of the short description which when clicked will reveal the rest of the description.
      Using Simple Markdown Editor with the description field
      If you have Simple Markdown Editor (InputfieldSimpleMDE) installed, you can enable the field description to have that editor.
      *When using Simple MDE, you can use the button (Insert Horizontal Line) instead of typing 5 dashes. More about SimpleMDE.
      Extending your field descriptions using content from a ProcessWire Page for the field description.
      You may use the content from a ProcessWire page as a field description. This would allow you to easily insert images, links, and use hanna codes.
      To use page content for your field descriptions, please follow these instructions:
      Install Select Fields module (FieldtypeFields) http://modules.processwire.com/modules/fieldtype-fields/ Create a new field using this field type, e.g. field_select. Add the field to any template you will be using for your field descriptions. Setup your help pages (for example under a settings branch) where you will store the field description content,using the template containing the Field Select. Add content to a page and select the field where that content should show. To show a short text before the link to the longer content, separate them with 5 dashes Be sure to update your settings on this page, first enable page content descriptions,then specify the name of the Select Fields field, template to search, and content field. If you create a field description using this method, please note that the description field must be blank for contexts where you want the page content to appear.
      You can freely use template context for field descriptions, but the Page Content method is not context sensitive and will display under all contexts where the description is blank.
      ----
      original post:
      This is a new module, hope to release soon, which allows extended field descriptions, in currently 2 ways.
      The main feature of the module is that you can have a short description and then a 'more...' link which drops down a longer block of text.
      This is achieved by separating the intro/visible text and the rest with 5 dashes.

      Example setup:

      the 2nd way is if you are using AdminThemeUiKit, you can show extended field instructions in a panel. The content of the panel is edited on a regular PW page. This use case would probably not be that common, but if you had a field that required some extended instructions for how to use, this could be useful; Also, since this allows you to target information and instructions down at the field level, it could reduce the amount of documentation needed on a global level, since it is a lot more context targeted.

    • By netcarver
      Part 1 of a 2 part Module & Service Reveal.
      I'm currently working on a new module: ModuleReleaseNotes that was inspired by the work I originally did on making Ryan's ProcessWireUpgrades module "release" aware. In the end, I decided to ditch the approach I was originally taking and instead work on a module that hooked in to the UpgradeConfirmation dialog and the module edit page.
      Aims
      My aims for this module are as follows...
      Make discovery of a module's changes prior to an upgrade a trivial task. Make breaking changes very obvious. Make reading of a module's support documentation post-install a trivial task. Make module authors start to think about how they can improve the change discovery process for their modules. Make sure the display of information from the module support files/commit messages doesn't introduce a vulnerability. Looking at these in turn...
      Making discovery of a module's changes prior to upgrade a trivial task.
      This is done by adding a "What's changed section" to the upgrade confirmation dialog.  This section takes a best-effort approach to showing what's changed between the installed version and the updated version that's available via the module repository.
      At present, it is only able to talk to github-hosted repositories in order to ask them for the release notes, the changelog file (if present) and a list of commits between the git tag that matches the installed version and the tag matching the latest version.
      It will display the Release Notes (if the author is using the feature), else it will display the commits between the tags (if tagging is used by the module author) else it will show the changelog file (if present) else it will show the latest N commits on the master branch (N, of course, being configurable to your liking.)
      An example of the Github Release Notes pulled in for you, taken from Mike Rockett's TextformatterTypographer Module...

      An example of a tag-to-tag commit list from the same module...

      An example of a changelog - formatted to show just the changes (formatting styles will change)...

      Finally, an example of a fallback list of commits - sorry Adrian ...

       
      Making breaking changes obvious.
      This is currently done by searching for a set of configurable search strings. Later versions may be able to support breaking change detection via use of Semantic Versioning - but this may require some way of signalling the use of this versioning standard on a module-by-module basis.
      For now, then, you can customise the default set of change markers. Here I have added my own alias to the list of breaking change markers and the changes section of the changelog is styled accordingly (these will be improved)...

       
      Make reading of a module's support documentation, post-install, a trivial task.
      This is done by making some of the support files (like the README, CHANGELOG and LICENSE files) readable from the module's information/settings screen. There is an option to control the initial open/closed state of this section...

      Here is Tracy's README file from within the module settings page... 

       
      Make module authors start to think about how they can improve the change discovery process for their modules.
      There are notes in each of the sections displayed on the upgrade confirmation page that help authors use each of the features...

       
      Make sure display of external information doesn't introduce a vulnerability.
      This is an ongoing concern, and is the thing that is most likely to delay or prevent this module's release lead to this module's withdrawl should a vulnerability be found. Currently, output is formatted either via Markdown + HTML Purifier (if it was originally a Markdown file) or via htmlspecialchars() if it has come from a plaintext file.
      If you discover a vulnerability, please get in contact with me via the forum PM system.
       
      Ongoing...
      For now, I've concentrated on integration with GitHub, as most people use that platform to host their code. I know a few people are hosting their repositories with BitBucket (PWFoo comes to mind) and some with GitLab (Mike Rockett?) and I would eventually like to have adaptor implementations for these providers (and perhaps GitKraken) - but for now, GitHub rules and the other hosts are unsupported.
       
      Links
      Github: ModuleReleaseNotes
      PW Module Repository: Here (pending?)