Jump to content

Recommended Posts

@manlio - sorry for the rough first experience with Migrator - any chance you could PM me the zip package you are trying to import?

@Septhiroth - good catch, and yes, PR's are always very welcome - thanks :)

  • Like 1
Link to post
Share on other sites
  • 2 months later...

Just wanted to post a little warning here.

@SteveB PM'd me with an issue he was have with a relatively complex migration. I initially tested on PW 2.5.3 and everything worked flawlessly in several tests, which is great!

But then testing on the latest PW dev there were some significant issues with certain pages not ending up where they were supposed to be, so I need to look into this in more detail, but just wanted to remind you guys on dev to be careful until I figure this out. Not sure what version of PW this started happening with.

  • Like 1
Link to post
Share on other sites
  • 5 months later...

An update on the status of Migrator with respect to current dev version of PW (soon to be stable 2.7) would be much appreciated!

Reading this thread I get the sense that, understandably, there are plenty of edge case problems but do we know what's working reliably on recent PW installations? I'm piecing together a staging-to-live strategy for a site where most of the content will be imported from non-PW data sources (including images).

One way is to first delete those pages which get imported from the external data, then use the reliable method of copying over the whole database, the site folders (templates and modules) and any necessary config, .htaccess, index.php tweaks. This keeps users, roles, user/role mapping and template access settings intact.

I feel as though a "cleaner" way would be to explicitly export/import users, roles, user/role mapping and all template settings. Then I could start with a clean PW install. How much of that might Migrate be able to do these days?



Link to post
Share on other sites

Hi Steve,

I am sorry, I haven't had time to work on Migrator for a while now. It is definitely not abandoned - I just need to find a good chunk of time to revisit a few things regarding Page fields and sort out remaining bugs. I will try to take a look at this sometime soonish.

Regarding the last part of your question - Migrator currently creates new users/roles if the creator/modifier of the imported content was created by a user that doesn't exist on the new site. The problem of course is migrating the user's password - is this a requirement in your scenario? All the template settings etc are all handled completely by Migrator.

I also have some aspirations to take Migrator a step further and allow it to connect directly to another site and sync changes, but if this happens it will be some time away and will likely be a commercial version of Migrator.

I am not sure if that really helps you at the moment. I am away for the next few days and busy for the week or so after that, but might see if I can get a new version out before the end of the month - but no promises :)

  • Like 4
Link to post
Share on other sites

Thanks Adrian. I'm just trying to figure out what it might be relied upon to do in it's current, work-in-progress, state. For this project I can probably just build users from scratch each time. The password issue can be dealt with.

Link to post
Share on other sites
  • 7 months later...

Hi Adrian

this module looking very good! But i have some strange problems. So export on page tree from one site (whole tree; pw 3.0.15) wich works very well. And I want to import it on PW 3.0.18 System. wich seems to work also well. Templates and fields are created. I also get the info "Created all required templates and fields and imported/edited 140 pages" but if I view on the page tree nothing is there. I dont see any errors. So maybe its because of the 3.0.x version. Do you have tested it with the 3.0.x version?

What else could I try?

Link to post
Share on other sites

@jensweigel - please try this commit: https://github.com/adrianbj/ProcessMigrator/tree/3e2121b8fdb68e9d9dc0c6aca8aae75e923a2669

I also have a PR from @jlahijani (https://github.com/adrianbj/ProcessMigrator/pull/5) which may also take care of the problem. I will try to make some time today to review his changes and the last working commit noted above and get a new version out.

Link to post
Share on other sites
  • 1 month later...

Seems like Migrator has problems with templates that include InputfieldPageTable fields. When importing pages that include this fieldtype, Migrator also creates the pages that are stored inside this fieldtype.

Link to post
Share on other sites
4 hours ago, charger said:

Seems like Migrator has problems with templates that include InputfieldPageTable fields. When importing pages that include this fieldtype, Migrator also creates the pages that are stored inside this fieldtype.

HI @charger - isn't that the desired behavior? If it didn't create the pages that belong to the Page Table then you wouldn't be migrating all the content. Maybe I am misunderstanding though?

Link to post
Share on other sites

You’re of course right. The problem is that the pages that reside in these InputfieldPageTable fields will be moved out of their previous (nested) structure and are applied (flat) to the parent one selects during import.

Link to post
Share on other sites
  • 5 months later...

I'm trying to use this module to get pages to an external translation agency, that uses a translation memory. The multilanguage modules are in use and working fine. [Added English manually to the Dutch (default) site, trying to add French and German automatically.]

What worked fine:

  • Export of all pages as a json file
  • Import of that json file in their translation software
  • Inspection of their translated json file in Atom - looks fine

Then I tried to import their file, and that failed.

  • Append: nothing changed — expected behaviour
  • Overwrite/Replace: shows me this error
Error: Uncaught Error: Call to a member function setLanguageValue() on null in /Applications/MAMP/htdocs/site/modules/ProcessMigrator/ProcessMigrator.module:1441
Stack trace:
#0 /Applications/MAMP/htdocs/site/modules/ProcessMigrator/ProcessMigrator.module(161): ProcessMigrator->processImportForm2(Object(ProcessWire\InputfieldForm))
#1 /Applications/MAMP/htdocs/wire/core/Wire.php(374): ProcessMigrator->___executeImport()
#2 /Applications/MAMP/htdocs/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___executeImpor...', Array)
#3 /Applications/MAMP/htdocs/wire/core/Wire.php(402): ProcessWire\WireHooks->runHooks(Object(ProcessMigrator), 'executeImport', Array)
#4 /Applications/MAMP/htdocs/wire/core/ProcessController.php(244): ProcessWire\Wire->__call('executeImport', Array)
#5 /Applications/MAMP/htdocs/wire/core/Wire.php(374): ProcessWire\ProcessController->___execute()
#6 /Applications/MAMP/htdocs/wire/core/WireHooks.php(698): ProcessWire\Wire->_ (line 1441 of /Applications/MAMP/htdocs/site/modules/ProcessMigrator/ProcessMigrator.module) 


Link to post
Share on other sites

I did some further testing.

When I choose Replace instead of Overwrite, all texts with multi-language input are deleted, including default language.

I even tested with exporting to a zip, and then importing that same zip. Same errors. So, it's not related to what the translator could have done with the files.

Link to post
Share on other sites
3 hours ago, mds said:

Inspection of their translated json file in Atom - looks fine

Just because it looks like valid json doesn't mean it's in the correct format for Migrator.

But could you please make sure you are using this version of Migrator: https://github.com/adrianbj/ProcessMigrator/tree/3e2121b8fdb68e9d9dc0c6aca8aae75e923a2669

It is two commits behind, but it looks like some bugs were introduced since that commit.

As an update on this project. I still do want to get back to it, but I am now going to wait until Ryan completes all the new core page migration tools so I can use those new core methods. Will wait and see exactly what functionality he builds and extend from there if needed.

  • Like 2
Link to post
Share on other sites

Thanks, Adrian. Very grateful. 
That version doesn't spit out the error I mentioned.

I get another error now: the Home-page gets added as a new page on import, but that's something I can manually adjust.

Looking forward to updates on exporting/importing/migrating.
Loving Processwire so far, and it's only early days!

Link to post
Share on other sites
  • 1 month later...

Will this module be updated for PW 3.x?

I have problems like: "Call to a member function setLanguageValue() on a non-object"

Line 1441 of ProcessMigrator.module.

Is there a similar working tool for copying local pages (trees) to remote?

Thank you.

Link to post
Share on other sites

Hi @theo - this looks related to (https://github.com/adrianbj/ProcessMigrator/issues/4).

What commit are you using? Please try this one (two back from current) - https://github.com/adrianbj/ProcessMigrator/tree/3e2121b8fdb68e9d9dc0c6aca8aae75e923a2669

I will likely recreate this module in the future after Ryan fully implements the new core methods for exporting/importing pages



Tools for exporting and importing of pages. We've got some nice built-in tools for importing and exporting of templates and fields, but not yet for pages. Over the coming year, I'm hoping to add page import/export as well. I'd like to be able to copy/paste a page or group of pages from one server to another.


I just don't have the time to put more effort into the current iteration of this, especially given that future versions should make use of the new core features.

  • Like 2
Link to post
Share on other sites
  • 4 weeks later...

Hello all. 

After playing with PW for some time now and having a heavy WP website, I decided to look this morning about a way to migrate WP to PW (how ironically it sounds ;) ). And here I am - trying out the MigratorWordpress.

Downloaded the XML file (18Mb containing around 700 posts and over 5000 comments). Uploaded the file and started the import. At the end, everything went smooth and I was suggested to check the imported pages. I was not surprised to find out that the import only did find some pages but not the posts itself (no offense to the authors for sure). This issue was not new to me as I was trying to import WP to ModX long time ago and ran into it as well. So what helped me at that time was a simple WP plugin caled Post Type Switcher that allowed me to move all the WP posts from custom post type to the default WP posts. After that I was able to import posts and comments almost flawlessly (I say almost, as I still had to go around the posts and clear the short-tag leftovers etc. - which is not an issue). 

As of now, I am testing the same approach to see if that would work again and will report back. My biggest concern is to have the posts properly imported and attached to their comments. I do not mind loosing keywords etc. as I am planning on redoing every post manually but moving comments that way would be an overkill ;)

Link to post
Share on other sites

Ok. All custo post types were converted back to standard wordpress posts and then the XML was exported using the Tools->Export feature. Then installed the both required modules - ProcessMigrator and MigratorWordpress and tried to import the posts into a newly created page called Import. Unfortunately it did not work with PW 2.8.5 and blows an error:

Error: Call to a member function get() on a non-object (line 1450 of C:\OpenServer\domains\recipemagician.pw\site\modules\ProcessMigrator\ProcessMigrator.module) 

This error message was shown because: you are logged in as a Superuser. Error has been logged.

I tried with the latest 3.0.55 and it did not work either. Is there any specific version to try with that would seemed to work?

Link to post
Share on other sites
2 minutes ago, MilenKo said:

Thanks Adrian. Testing it now. Would you recommend using 3.X or 2.X?

Migrator and MigratorWordpress were written for 2.x so that might be safer, but I have used Migrator itself with 3.x without any issues, but I haven't used MigratorWordpress with 3.x yet.

FYI - as I mention above:

On 1/11/2017 at 7:07 AM, adrian said:

As an update on this project. I still do want to get back to it, but I am now going to wait until Ryan completes all the new core page migration tools so I can use those new core methods. Will wait and see exactly what functionality he builds and extend from there if needed.


Link to post
Share on other sites

Adrian, that is understandable considering the amount of work and changes that needs to be applied. Will try now with 2x version and see how it goes. In regards to the shorcodes, this was one of the things that initially pushed me to search for another CMS. I used a few themes before starting to deal with the next one on my own and with every theme change there were more and more shortcodes used. After the latest theme some were dropped out so it got ugly. That is why all I care is to have the comments and posts imported properly. The rest I will setup up/change/clean myself as a part of the process and learning curve ;)

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 FireWire
      Hello community!

      I want to share a new module I've been working on that I think could be a big boost for multi-language ProcessWire sites.

      Some background, I was looking for a way for our company website to be efficiently translated as working with human translators was pretty laborious and a lack of updating content created a divergence between languages. I, and several other devs here, have talked about translation integrations and have recognized the power that DeepL has. DeepL is an AI deep learning powered service that delivers translation quality beyond any automated service available. After access to the API was opened up to the US, I built Fluency, a DeepL translation integration for ProcessWire.
      Fluency brings automated translation to every multi-language field in the admin, and also provides a translation tool allowing the user to translate their text to any language without it being inside a template's field. With Fluency you can:
      Translate any plain textarea or text input Translate any CKEditor content (yes, with markup) Translate page names for fully localized URLs on every page Translate your in-template translation function wrapped strings Translate modules Fluency is free, and now so is DeepL
      Since this module was first built DeepL has introduced free Developer accounts that allow anyone to start using Fluency at zero cost and beginning with the version 0.3.0 release Fluency now supports free DeepL accounts. As of June 2021 DeepL supports translation to 26 languages and continues to offer more!
      Installation and usage is completely plug and play. Whether you're building a new multi-language site, need to update a site to multi-language, or simply want to stop manually translating a site and make any language a one-click deal, it could not be easier to do it. Fluency works by having you match the languages configured in ProcessWIre to DeepL's. You can have your site translating to any or all of the languages DeepL translates to in minutes (quite literally).
      Let's break out the screenshots...
      When the default language tab is shown, a message is displayed to let users know that translation is available. Clicking on each tab shows a link that says "Translate from English". Clicking it shows an animated overlay with the word "Translating..." cycling through each language and a light gradient shift. Have a CKEditor field? All good. Fluency will translated it and use DeepL's ability to translate text within HTML tags. CKEditor fields can be translated as easily and accurately as text/textarea fields.

      Repeaters and AJAX created fields also have translation enabled thanks to a JavaScript MutationObserver that searches for multi-language fields and adds translation as they're inserted into the DOM. If there's a multi-language field on the page, it will have translation added.

      Same goes for image description fields. Multi-language SEO friendly images are good to go.

      Creating a new page from one of your templates? Translate your title, and also translate your page name for native language URLs. (Not available for Russian, Chinese, or Japanese languages due to URL limitations). These can be changed in the "Settings" tab for any page as well so whether you're translating new pages or existing pages, you control the URLs everywhere.

      Language configuration pages are no different. Translate the names of your languages and search for both Site Translation Files (including all of your modules)

      Translate all of the static text in your templates as well. Notice that the placeholders are retained. DeepL is pretty good at recognizing and keeping non-translatable strings like that. If it is changed, it's easy to fix manually.

      Fluency adds a "Translate" item to the CMS header. When clicked this opens up a modal with a full translation tool that lets the user translate any language to any language. No need to leave the admin if you need to translate content from a secondary language back to the default ProcessWire language. There is also a button to get the current API usage statistics. DeepL account owners can set billing limitations via character count to control costs. This may help larger sites or sites being retrofitted keep an eye on their usage. Fluency can be used by users having roles given the fluency-translate permission.

      It couldn't be easier to add Fluency to your new or existing website. Simply add your API key and you're shown what languages are currently available for translation from/to as provided by DeepL. This list and all configuration options are taken live from the API so when DeepL releases new languages you can add them to your site without any work. No module updates, just an easy configuration. Just match the language you configured in ProcessWire to the DeepL language you want it to be associated with and you're done. Fluency also allows you to create a list of words/phrases that will not be translated which can prevent items such as brands and company names from being translated when they shouldn't

      No "translate page" - Translating multiple fields can be done by clicking multiple translation links on multiple fields at once but engineering a "one click page translate" is not feasible from a user experience standpoint. The time it takes to translate one field can be a second or two, but cumulatively that may take much longer (CKEditor fields are slower than plain text fields). There may be a workaround in the future but it isn't currently on the roadmap. No "translate site" - Same thing goes for translating an entire website at once. It would be great, but it would be a very intense process and take a very (very) long time. There may be a workaround in the future but it isn't on the roadmap. No current support for Inline CKEditor fields - Handling for CKEditor on-demand hasn't been implemented yet, this is planned for a future release though and can be done. I just forgot about it because I've never really used that feature personally.. Alpha release - This module is in alpha. Releases should be stable and usable, but there may be edge case issues. Test the module thoroughly and please report any bugs via a Github issue on the repository or respond here. Please note that the browser plugin for Grammarly conflicts with Fluency (as it does with many web applications). To address this issue it is recommended that you disable Grammarly when using Fluency, or open the admin to edit pages in a private window where Grammarly may not be loaded. This is an issue that may not have a resolution as creating a workaround may not be possible. If you have insight as to how this may be solved please visit the Github page and file a bugfix ticket.
      ProcessWire  3.0+ UIKit Admin Theme That's Fluency in a nutshell. A core effort in this module is to create it so that there is nothing DeepL related hard-coded in that would require updating it when DeepL offers new languages. I would like this to be a future-friendly module that doesn't require developer work to keep it up-to-date.
      The Module Is Free
      This is my first real module and I want to give it back to the community as thanks. This is the best CMS I've worked with (thank you Ryan & contributors) and a great community (thank you dear reader).
      DeepL Developer Accounts
      In addition to paid Pro Developer accounts, DeepL now offers no-cost free accounts. Now all ProcessWire developers and users can use Fluency at no cost.
      Learn more about free and paid accounts by visiting the DeepL website. Sign up for a Developer account, get an API key, and start using Fluency today.
      Download & Feedback
      Download the latest version here
      Github repository:
      File issues and feature requests here (your feedback and testing is greatly appreciated):
      Thank you! ¡Gracias! Ich danke Ihnen! Merci! Obrigado! Grazie! Dank u wel! Dziękuję! Спасибо! ありがとうございます! 谢谢你!

    • By monollonom
      (once again I was surprised to see a work of mine pop up in the newsletter, this time without even listing the module on PW modules website 😅. Thx @teppo !)
      Github: https://github.com/romaincazier/FieldtypeQRCode
      Modules directory: https://processwire.com/modules/fieldtype-qrcode/
      This is a simple module I made so a client could quickly grab a QR Code of the page's url in the admin.
      There's not much to it for now, but if need be you can output anything using a hook:
      $wire->addHookAfter("FieldtypeQRCode::getQRText", function($event) { $event->return = "Your custom text"; }) You can also output the QR code on your front-end by calling the field:
      echo $page->qr_code_field; The module uses the PHP library QR Code Generator by Kazuhiko Arase. When looking for a way to generate a QR Code in PW I came across @ryan's integration in his TFA module. I'm not very familiar with fieldtype/inputfield module development so I blindly followed @bernhard (great) tutorial and his BaseFieldtypeRuntime. At some point I'll take a deeper look to make a module on my own.
      Some ideas for improvements :
      add the ability to choose what to ouput : page's url / editUrl / file(s) / image(s) / ... allow to output multiple QR codes ?
    • By Chris Bennett
      Inspired by @bernhard's excellent work on the new customisable LESS CSS getting rolled into the core soon, I thought I would offer up the module for beta testing, if it is of interest to anyone.

      It takes a different approach to admin styling, basically using the Cascade part of CSS to over-ride default UiKit values.
      Values are stored in ModuleConfig Module creates a separate AdminThemeTweaker Folder at root, so it can link to AdminThemeTweaker.php as CSS AdminThemeTweaker.php reads the module values, constructs the CSS variables then includes the CSS framework Can be switched on and off with a click. Uninstall removes everything, thanks to bernhard's wonderful remove dir & contents function.
      It won't touch your core. It won't care if stuff is upgraded. You won't need to compile anything and you don't need to touch CSS unless you want to.

      It won't do much at all apart from read some values from your module config, work out the right CSS variables to use (auto contrast based on selected backgrounds) and throw it on your screen.
      You can configure a lot of stuff, leave it as it comes (dark and curvy), change two main colors (background and content background) or delve deep to configure custom margins, height of mastheads, and all manner of silly stuff I never use.

      Have been developing it for somewhere around 2 years now. It has been (and will continue to be) constantly tweaked over that time, as I click on something and find something else to do.
      That said, it is pretty solid and has been in constant use as my sole Admin styling option for all of those 2 years.

      If nothing else, it would be great if it can provide any assistance to @bernhard or other contributor's who may be looking to solve some of the quirkier UiKit behavior.
      Has (in my opinion) more robust and predictable handling of hidden Inputfields, data-colwidths and showIf wrappers.
      I am very keen to help out with that stuff in any way I can, though LESS (and any css frameworks/tools basically) are not my go.
      I love CSS variables and banging-rocks-together, no-dependency CSS you can write with notepad.


    • By opalepatrick
      I see old posts saying that repeaters are not the way to go in Custom Process Modules. If that is the case, when using forms (as I am trying to do) how would one tackle things like repeat contact fields where there can be multiple requirements for contact details with different parameters? (Like point of contact, director, etc) or even telephone numbers that have different uses?
      Just for background I am creating a process module that allows me to create types of financial applications in the admin area (no need to publish any of this, pure admin) that require a lot of personal or company information.
      Maybe I am thinking about this incorrectly?
    • By HMCB
      I ran across a reference to IftRunner module. The post was 6 years ago. I cant find it in available modules. Has it been pulled?
  • Create New...