- πΊπΈUnited States hongpong Philadelphia
Can anyone else check this one out and give it RTBC? Thank you!
- π¬π·Greece bserem
None of the latest patches apply anymore. Trying to apply them by hand ends in deprecation warnings.
- Merge request !21Issue #3173916. Reroll wordpress_migrate import as media, added type safety to parameters. β (Open) created by hongpong
- πΊπΈUnited States hongpong Philadelphia
I added a few type safety updates flagged in the IDE. Otherwise should be a clean re-roll against today's 8.x-3.x. i saw the WordPressMigrationGenerator "path alias generator" part, I think the reroll patch here is correct but should be double checked.
(the MR !21 is the same as this patchfile.)
I applied it using
patch -p1 < 3173916-11.patch
from the base dir of the module as working directory. This helps deal with stuck hunk patch application. I did not test this but wanted to give people a clean spot to start again with this issue. - πΊπΈUnited States hongpong Philadelphia
Oops - my local 8.x-3.x was missing the latest "path alias generator" commit. re rolled again.
- πΊπΈUnited States hongpong Philadelphia
some more notices. Per !MR21 reroll . https://git.drupalcode.org/project/wordpress_migrate/-/merge_requests/21
Major - Access to an undefined property Drupal\wordpress_migrate\WordPressMigrationGenerator::$mediaAudioID.
in src/WordPressMigrationGenerator.php:167Major - Access to an undefined property Drupal\wordpress_migrate\WordPressMigrationGenerator::$mediaDocumentID.
in src/WordPressMigrationGenerator.php:167Major - Access to an undefined property Drupal\wordpress_migrate\WordPressMigrationGenerator::$mediaImageID.
in src/WordPressMigrationGenerator.php:167And additional phpstan and phpcs notices.
- πΊπΈUnited States hongpong Philadelphia
Some upstream changes in wordpress_migrate_ui/src/Form/ImageSelectForm.php - the merge conflict is only there, basically got similar modernization by other folks. I'm not actively going to tangle with this one more for now, but if someone else wants to hammer away on it, go ahead.
- First commit to issue fork.
- Merge request !35Issue #3173916. Reroll wordpress_migrate import as media, added type safety to parameters. β (Open) created by abarrio
- πͺπΈSpain abarrio
Created a new MR with branch 3173916-import-as-media rebased to 8.x-3.x.
- πΊπΈUnited States hongpong Philadelphia
Thanks so much abarrio for rebasing. Any ideas what we can do to fix the "Access to an undefined property" stuff flagged above? That seems like the biggest flagged snag currently.
- πͺπΈSpain abarrio
Uploaded a fixing for the undefined property error and fixing some other coding standards on WordPressMigrationGenerator.
- πͺπΈSpain abarrio
Uploaded one fix for an undefined index url error when executing drush ms and changed xpath expressions on media migrations with a simpler one.
- πΊπΈUnited States hongpong Philadelphia
excellent stuff abarrio. do you think it is RTBC yet? I don't have a test xml with audio attachment to test.
- πͺπΈSpain abarrio
No, I think there is more work remaining to have it as RTBC.
I think we still need to work on:- Test each media type to check that is completely working automatically without changing yml
- Fix coding standard of all new code
- Maybe be able to check if xml file is completely correct to avoid problems when importing (Maybe could be done on a follow up issue)
- Create some unit tests
- Fix all problems that appears on merges
I think with this points resolved we can proceed with this as RTBC.
- πΊπΈUnited States hongpong Philadelphia
regarding checking the xml file see #3248042: Add XML Lint to check the WordPress exports β xml lint could be added to composer but i figured that would intensify requirements. as well as β¨ WP import xml entities & security considerations Active for a note on other considerations.
regarding testing media types I suppose this would require a new test site altogether with the types of assets in question.
if you think we can subdivide out any portion of the patch as well (in other words if you think some standalone portion would actually be RTBC as it is), let me know. Thanks for all this!
- πͺπΈSpain abarrio
Makes sense to me.
Maybe we can merge and complete this issue as a first approach and then continue working on some other issues to finish this big development part.
I think we need a meta issue with a complete list of tasks needed to finish it. If I have time this days I'll create it.
- πͺπΈSpain abarrio
that's completely true!!
The only yml files that needs to be there are the ones from migrations folder. - πͺπΈSpain abarrio
Removed unnecessary yml files from MR.
As I said on #26 I think we should work on those points but maybe we can proceed with this as a first approach and them complete the development in a follow up issue. - πΊπΈUnited States hongpong Philadelphia
Regardless of the 'nice to have' like xml check, unit tests and certain code standard flags, I think we need to be assured that the migration is working correctly for most use cases.
Forgive my silly question but is "document" like PDF files and things of that nature? In other words if someone has added a plugin that allows the PDF uploads in the media library, this would cover importing those. I'm a little more familiar with the built in audio content type. - πͺπΈSpain abarrio
Actually on each media is getting the default type and checking the extensions allowed there to get default value when configuring migration:
it is not different between types of attachment files, it is just getting them to drupal files and then converting it into media.
- leymannx Berlin
Need a static patch of the current state of MR 35. Thank you for your work so far π€