Athira Davis
Athira Davis

Reputation: 1

when Migrating typo3 version 9 to typo3 version 10.4.2 ,storagepid=0

Our project which was migrated from typo3 version 9 to version 10. The issue is storagepid = 0. I can hardcode the pid value to configuration. But that’s not a permanent solution. If I use same plugin in different project again I have to hardcode storagepid value. So I need a permanent solution to fix it out.Can anyone help me to find out the solution?

Upvotes: 0

Views: 51

Answers (1)

derhansen
derhansen

Reputation: 6133

There is no need to hardcode the storagePid in PHP code, since TYPO3 Extbase plugins typically will fetch the storagePid(s) from configuration (either TypoScript, starting point or plugin settings).

This blogpost I wrote some years ago explains, how and in which order Extbase will determine the storagePid.

The most suitable way is to use the starting point setting in the plugin, which automatically will be taken into account when data is fetched (e.g. in a Extbase repository). This way, you can use the plugin in several projects and the editor can select the storagePid(s) directly in plugin settings.

Upvotes: 1

Related Questions