Jump to content

Why isn't PagesExportImport working on some multi language fields?


sodesign
 Share

Recommended Posts

Hi all,

I'm having trouble with an import. Some translated text imports correctly, some doesn't. There are no errors or warnings displayed.

Background

We're running a big import on a file which was originally exported using the built in Export/Import module. Trying this both in the Admin, and by using 

$importer = new PagesExportImport();
$importer->importJSON($json); 

Seems like some text imports correctly, some doesn't. Some fields which work are inside MatrixRepeaters, some are just fields on the page. The same field types even work some places but not others.

The import runs without error, and the message shown suggests all the fields imported correctly.

Debugging

I have been trying to identify if anything is failing silently. I've been reading PagesExportImport.php and I think line #978 is the function call where the imported field content is saved:

$page->set($field->name, $pageValue)

The thing is, when I print the values either side of this function, the field values are correct. I'm not familiar enough with the inner workings of PW to really understand what might be going on. 

Next steps

Where else should I check? Are there any other functions used to save imported field content? 

Or are there any better ways to go about debugging this?

Thanks!

 

Edit - I've attached 2 screenshots. the Messages are with const debug = true; set in ProcessPagesExportImport.module. I believe they show that the import should have worked. The heading screenshot field shows that the translations didn't import correctly. I'm not sure if this is a bug or something I'm missing.  

 

CleanShot 2023-06-14 at 13.43.35.png

CleanShot 2023-06-14 at 13.43.03.png

Edited by sodesign
Add some screenshots
  • Like 1
Link to comment
Share on other sites

@sodesign - thanks for posting about this.

Just to let everyone else know, there is another thread about the same issue affecting the Profields VerifiedURL field and Ryan is engaged, so hopefully this will be sorted sooner than later.

I have a workaround for now if anyone needs it urgently.

  • Like 1
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...