adrian

Module
Migrator

278 posts in this topic

Hey Joss - thanks for the file.

The issue was with some broken images embedded into your blog posts - some linking to an old joomla site :). Migrator now handles broken images properly so no errors.

I also took the opportunity to add a few more fixes and enhancements to embedded images and captions - links to the original sized version now also work (although I am wondering the best way to add a class for lightbox display of these. I don't want to assume the class that users want, so maybe this needs to be a configurable setting - any thoughts?).

Please try the latest versions of both ProcessMigrator and MigratorWordpress (again from my fork) and let me know how you go.

Here's a screenshot of what one of blog posts looks like for me once imported. Be patient - it can take quite some time to download all those images, but it will work :)

post-985-0-51869800-1417570430_thumb.png

1 person likes this

Share this post


Link to post
Share on other sites

I think with the lightbox side you could add a field for a class, but some lightboxes need more than that and it could get complicated. Maybe a note in the instructions that this might be something better handled with a bit of javascript on the fly. I might find a mix between the two useful - adding a class at processing at least identifies the image and then one could decide what to do later.

On the other hand, a blog might not always have images linked to bigger version - so not sure what to do then....

Share this post


Link to post
Share on other sites

Am not importing a JSON its a wordpress.xml am trying to import to Processwire using Nico's MigratorWordpress. wow that was a fast response

Share this post


Link to post
Share on other sites

Any finally got it to import my contents but i had to comment the following

 
if(empty($fp)){



                $this->error("Missing required ZIP or JSON Source");
                if($this->session->migratorFilesDir && file_exists($this->session->migratorFilesDir)) $this->recursiveDelete($this->session->migratorFilesDir);
                //$this->session->redirect('./'.$this->session->type);
                return $form->render();
            }

Share this post


Link to post
Share on other sites

I am not really sure on why that would happen - did the import actually work properly after commenting out that check?

The fact that $fp is empty at that point in the code suggests that the conversion from the xml into a json file ready for parsing by migrator didn't work. But if it all worked as expected for you, then I'll just add it to my list of things to keep an eye on.

Share this post


Link to post
Share on other sites

Ignore what i wrote it imported also without the comment, am still going to look at it again in the morning take care

Share this post


Link to post
Share on other sites

I am not sure why you are getting that missing required zip or json error, but it would be helpful if you could PM me the xml file so I can test. 

I don't really understand what is wrong in the second image you posted.

To attach images here, you need to click the "More Reply Options" button.

Share this post


Link to post
Share on other sites

Thanks - I have been doing lots of testing with your file and can't replicate the "missing required zip or json" error. I did however find some bugs regarding image import in certain situations that I have just fixed, so please grab the latest versions of both Migrator and MigratorWordpress.

I will send some screenshots showing the properly imported content in reply to the PM you sent.

In an attempt to figure out why you are getting that error, can you please try logging the value of: $this->session->jsonFilename and also uncomment the exit on line 882. Then make sure that there is some json content in the file at the path that should be stored in: $this->session->jsonFilename

Share this post


Link to post
Share on other sites

Thanks now i am more encourage knowing it works on your end. I will do as specified and debug it and monitor the variables. I wanted to be sure I wasn't an exception thanks alot andrian.

1 person likes this

Share this post


Link to post
Share on other sites

While trying to get some contents into my site i got the following issue, been familiar with PHP Development I tried looking for codes that tried to do the similar:

$SessionFakeObject->set('keyStore',$DatabaseInstance);

As the above will cause the $DatabaseInstance to be serialized which is not allowed, however I have tried debugging and can't really point what could be the cause (also my Zend Debugger is busted) so if anyone has experienced such error please respond so i look at how to fix it. 

As for the previous error am behind a Firewall so that's explainable

post-2850-0-03174200-1419933727_thumb.pn

Share this post


Link to post
Share on other sites

Sepiroth - I moved your post here, because all those relate to Migrator.

The first one regarding Github is surprising - perhaps they were down momentarily. Please let me know if you continue to see that one.

The serialize error is also a mystery to me - I see it occasionally when I use Migrator - it seems to be random and it doesn't seem to affect the import process. I don't do any database serialization in the module at all. I need to investigate further at some point, but I think for the moment it can be safely ignored.

Share this post


Link to post
Share on other sites

Sepiroth - I moved your post here, because all those relate to Migrator.

The first one regarding Github is surprising - perhaps they were down momentarily. Please let me know if you continue to see that one.

The serialize error is also a mystery to me - I see it occasionally when I use Migrator - it seems to be random and it doesn't seem to affect the import process. I don't do any database serialization in the module at all. I need to investigate further at some point, but I think for the moment it can be safely ignored.

The first one is all me I work in Switching company (Online Payment and all), so our firewall is pretty strong so that I know is as a result of the firewall, however the second error which is quite confusing because there's no assign of any Database instance in a session in your code. so am wondering how that's happening. Spent the whole night trying to get my Zend Debugger working but failed once its up i will check the Debug steps. 

Share this post


Link to post
Share on other sites

Okay so i switched to Xdebug and spent the whole night debugging and during the Xdebug it never broke at ll, it converted the code and returned the json and exited as expected. This has nothing to do with the Module/Processwire if not i should have been thrown an exception during the debugging. so i will research more on this but i took out the thirdparty.json it outputted after monitoring the code. will simply import that and move on with life. 

Share this post


Link to post
Share on other sites

All the Post imported into ProcessWire from WordPress thanks alot am really glad thanks for the support.

post-2850-0-38131100-1420126463_thumb.pn

1 person likes this

Share this post


Link to post
Share on other sites

Very glad it is working for you as expected. But I am curious what, if any changes you made. Did the Github issue fix itself?

What about the missing zip/json error - was that just a result of the exit code commenting?

Is there anything else I should know about?

Thanks again for your extensive testing - did you ever figure out anything around that serialization error?

Share this post


Link to post
Share on other sites

The exit code stops the script so it was the main reason i assumed the PDOException halted it but when i commented it, the script works perfectly. I no longer get the Missing Json or Zip Source message. As for the PDO Serialization issue i guess it's something we have to keep in mind, I have researched and scanned all PW source code I can't see any reason why it should. but I will occasionally look into it gradually. 

1 person likes this

Share this post


Link to post
Share on other sites

Hi, I'm trying to import pages with images from a website to another (PW 2.5.3 both) using migrator module, but I get errors and it doesn't work for me.


The errors appear during import.


I set the home as parent and then I click "upload and create content" button and the result are shown in this images.


 


error1a.jpg


 


error1b.jpg


 


 


If instead I check "Edit Imported content", after I click "Upload and create content" button, everything seems to work but in the end of the page I have this error


 


error2.jpg


 


And after when I click "Create Content" I have this one


 


error3.jpg


 


This the first time I use migrator. Thank you for any help.


Share this post


Link to post
Share on other sites

Has anyone tried importing an XML the size of 30mb when i try to nothing happens it just renders the same page. will try increasing my post_max_size and see what happens.

Share this post


Link to post
Share on other sites

Okay so increasing post_max_size works but if it's lower it fails silently so maybe a feature would be a message that checks the size of file against the ini_get('post_max_size') and display that to the user. should i create a pull-request for that ? Happy Sunday

1 person likes this

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 kixe
      Today I have been running in mysql errors using @renobird s Module MarkupActivityLog which still uses mysqli Driver.
      @all developers
      Although mysqli is still supported PDO driver is the default database driver in PW since https://processwire.com/about/news/introducing-processwire-2.4/
      and its strongly recommend to all module authors to use/change-to PDO driver instead of mysqli.

      @renobird I have sent a pull request.
       
    • By Nurguly Ashyrov
      NOTE: This thread originally started in the Pub section of the forum. Since we moved it into the Plugin/Modules section I edited this post to meet the guidelines but also left the original content so that the replies can make sense.  
      ProcessGraphQL
      ProcessGraphQL seamlessly integrates to your ProcessWire web app and allows you to serve the GraphQL api of your existing content. You don't need to apply changes to your content or it's structure. Just choose what you want to serve via GraphQL and your API is ready.
      Warning: The module supports PHP version >= 5.5 and ProcessWire version >= 3.
      Links:
      Zip Download Github Repo ScreenCast  
      At this moment the module is not available from the modules section. Please refer to the Readme to learn more about how to use the module.
       
      Original post starts here...
      Hi Everyone! I became very interested in this GraphQL thing lately and decided to learn a bit about it. And what is the better way of learning a new thing than making a ProcessWire module out of it! 
      For those who are wondering what GraphQL is, in short, it is an alternative to REST. I couldn't find the thread but I remember that Ryan was not very happy with the REST and did not see much value in it. He offered his own AJAX API instead, but it doesn't seem to be supported much by him, and was never published to official modules directory. While ProcessWire's API is already amazing and allows you to quickly serve your content in any format with less than ten lines of code, I think it might be convenient to install a module and have JSON access to all of your content instantly. Especially this could be useful for developers that use ProcessWire as a framework instead of CMS.
      GraphQL is much more flexible than REST. In fact you can build queries in GraphQL with the same patterns you do with ProcessWire API.
      Ok, Ok. Enough talk. Here is what the module does after just installing it into skyscrapers profile.

      It supports filtering via ProcessWire selectors and complex fields like FieldtypeImage or FieldtypePage. See more demo here
      The module is ready to be used, but there are lots of things could be added to it. Like supporting any type of fields via third party modules, authentication, permissions on field level, optimization and so on. I would love to continue to develop it further if I would only know that there is an interest in it. It would be great to hear some feedback from you. I did not open a thread in modules section of the forum because I wanted to be sure there is interest  in it first.
      You can install and learn about it more from it's repository. It should work with PHP >=5.5 and ProcessWire 3.x.x. The support for 2.x.x version is not planned yet.
      Please open an issue if you find bugs or you want some features added in issue tracker. Or you can share your experience with the module here in this thread.
    • By Macrura
      Released:
      http://modules.processwire.com/modules/jquery-ion-range-slider/
      The built in rangeslider is good, but it is somewhat limited if you need really specific slider interfaces, like with pips and showing the value on the handles.
      There are many Jquery rangesliders, but one of the best and easiest to implement is the ion.rangeSlider.
      http://ionden.com/a/plugins/ion.rangeSlider/en.html
      This is a preview of the very simple module that basically allows you to enable the ion.Rangeslider on any text input, and then you type in your params into the textarea field (careful, you can break the page's javascrpt if you are not careful!) There are way too many options to really make this configurable, so the easiest way it to have a free text field where you enter any params. The params are just passed to the instance of the slider.
      Features of ion.Rangeslider:
      Skin support. (5 skins included and PSD for skin creation) Any number of sliders at one page without conflicts and big performance problems Two slider types single (1 slider) and double (2 sliders) Support of negative and fractional values Ability to set custom step and snap grid to step Support of custom values diapason Customisable grid of values Ability to disable UI elements (min and max, current value, grid) Postfixes and prefixes for your numbers ($20, 20 € etc.) Additional postfix for maximum value (eg. $0 — $100+) Ability to prettify large numbers (eg. 10000000 -> 10 000 000 or 10.000.000) Slider writes its value right into input value field. This makes it easy to use in any html form Any slider value can be set through input data-attribute (eg. data-min="10") Slider supports disable param. You can set it true to make slider inactive Slider supports external methods (update, reset and remove) to control it after creation For advanced users slider has callbacks (onStart, onChange, onFinish, onUpdate). Slider pastes all its params to callback first argument as object Slider supports date and time  
      Screenshots comparing Inputfield Rangeslider (Soma) vs. JqueryIonRangeSlider...
      1) basic range using currency
      '
      Same with different skin

      Range of years

      Same with narrower column and different skin..

       
      the module is functional and being used on 1 site, but some additional testing is needed...
    • By FIA2008
      I'm using PHPdocumentor to generate documentation of my modules, but it fails to scan the .module files. Is there another way of making processwire see a module other than giving it a .module extension?
      I'd like to rename my module file to .php but then processwire no longer sees my module.
    • By fbg13
      Is it possible to update a module without it being in the module directory?
      The same way that one in the module directory is.