Greetings to all,
I’m from Portugal, newbie to Typo3 (some weeks) but lot’s or IT experience.
I’ve setup some test site and I have a quite large Wordpress content portal to migrate to Typo3 (more than 6000 posts). I expected
I will be using news extension for content.
I’ve already managed to migrate the post content but not images.
What are your recommendations and suggestions?
Does someone have experiences to share?
WordPress and TYPO3 handle the connection between files and blog/news articles quite differently, but since you have some IT experience, migrating shouldn’t be so hard once you know what the differences are. The most important ones are …
WordPress
Often puts image tags into the body text or within larger metadata fields in the database.
Often uses the URL to a pre-generated resized/optimized image version when inserting the image is often to a, not the original file.
TYPO3
Is a decoupled CMS. It separates the plain data (like file paths) from the information about how the content is displayed on the website. This is achieved by using separate database fields and tables to keep the data atomic.
Waits with creating web-optimized images until rendering a webpage using the image is rendered.
If you manage to extract information from Wordpress about which image original belongs to each Wordpress article, your import into TYPO3 has to include these steps:
Import the image files into TYPO3. For example dragging and dropping files into a folder in the Filelist module will upload the files to TYPO3 create file records in the sys_file table. This is the part of the FAL that keeps track of the actual files.
Create the connection between the news article and the images. This is done using the sys_file_reference table, which creates the relation between sys_file and any other table.
The FAL is very well documented, so reading the documentation (linked above) will probably get you far.
I’m also the author of the Integration REST API (interest) extension. (Contrary to what the name indicates, it also has a CLI.) It could help you with the actual data import, as you won’t have to keep track of the record IDs, as long as you use a unique identifier (e.g. whatever the article ID is in Wordpress). It also allows you to batch upload files by URL or Base64 encoded data.
Let me know if you need any further help. I’ll be happy to assist.
Hi Mathias, A HUGE thank you for these notes. I’m already learning the FAL but from what I just read I’ll get it done. I’ll also check your API carefully
Hi Mathias, I’ve already understood how the FAL works and I’ve successfully made some tests directly to db.
Thank you for pointing the right direction.
I was now installing your extension but got some issues:
My environment is
Composer version 2.7.2 2024-03-11 17:12:18
PHP version 8.3.4 (/usr/bin/php8.3)
Typo3 version 12.4.13
My php/Symfony version requires that execute function has a return type int.
So, I’ve changed you extension files:
ClearRecordHashCommandController.php on line 43
CreateCommandController.php on line 47
DeleteCommandController.php on line 77
PendingRelationsCommandController.php on line 55
UpdateCommandController.php on line 47
just adding :int to the function declaration
Maybe you want to upgrade your extension.
Regards
António
PS.
I think this “upgrade” requires a little bit more attention. I’m getting always this error:
Cannot set a default value when using InputOption::VALUE_NONE mode.
The issues you mention were fixed in 2.1.1 and 2.1.2 respectively.
It sounds like you have installed version 2.1.0 or lower of the extension. Composer may have selected it because those versions don’t specify a Symfony version requirement. Try specifying "pixelant/interest" => "^2.1.2" in your composer.json file.
TYPO3 v12.4.10 introduced support for Symfony v7, but introducing that same support in the extension would break compatibility with TYPO3 v11. For now support is limited to Symfony v6, which also works fine with TYPO3 v12.