Comments (5)
Don't think there will be any regressions by adding $uriBuilder->initializeObject()
.
Can you create a pull request?
from aimeos-typo3.
I'm wondering a little bit about your issue, because this method should be called after content object creation. Can you share your code for an exacter investigation? Perhaps there is an error in the CMS core too...
from aimeos-typo3.
TYPO3 itself does call the function when instantiating the object, that's not the problem.
Basically, the \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder class is configured via an object of type \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface. Usually this is automatically injected with extbase. And on its live-cycle initialize method, it copies the content object form the ConfigurationManager into itself:
class UriBuilder {
[...]
/**
* @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
*/
public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager)
{
$this->configurationManager = $configurationManager;
}
[...]
/**
* Life-cycle method that is called by the DI container as soon as this object is completely built
*
* @return void
*/
public function initializeObject()
{
$this->contentObject = $this->configurationManager->getContentObject();
}
[...]
}
However, cli_dispatch doesn't automatically provide a content object. Aimeos creates its own ConfigurationManager and content object, and manually calls the extbase inject method. Simplified code example:
$contentObjectRenderer = $objectManager->get( 'TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer' );
$configurationManager = $objectManager->get( 'TYPO3\CMS\Extbase\Configuration\ConfigurationManager' );
$configurationManager->setContentObject( $contentObjectRenderer );
$uriBuilder = $objectManager->get( 'TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder' );
$uriBuilder->injectConfigurationManager( $configurationManager );
return uriBuilder;
The current issue is that although the configuration manager is replaced, the initialize method isn't called a second time and thus the content object reference inside the UriBuilder is still empty.
from aimeos-typo3.
OK, then it's fine because the initialize method should be called only once!
from aimeos-typo3.
PR is merged
from aimeos-typo3.
Related Issues (20)
- signal slot implementation does not work in 11 HOT 1
- TYPO3 is stuck to v10.4.24 with aimeos/aimeos-typo3 v21.10.4 HOT 2
- Your Composer dependencies require a PHP version ">= 8.0.0". HOT 2
- Scheduler not working (Undefined array key) HOT 17
- Aimeos Shop advanced scheduler not saving catalog page id HOT 7
- Aimeos Advanced Scheduler - Forgot field 'aimeos_pageid_catalog' HOT 1
- Don't break TYPO3 database compare HOT 7
- Renaming "Supplier" via page.tsConfig has no impact HOT 8
- Exception when using postgresql database HOT 19
- Update Script Composer.php has wrong path HOT 4
- Typo3 12.4.5 - Bootstrap autoload causes error in backend module HOT 2
- HTML not nested correctly HOT 2
- A Warning is showing up in Database Upgrade Wizard / Reports module after successful database migration HOT 1
- Cannot install `v23.10.1` in PHP 8.2 due to `nyholm/psr7 ` HOT 3
- Incompatibility with Symfony/Console^7 (^TYPO3 12.4.10) HOT 2
- [update] - Update the broken Image Link HOT 2
- Usage of anonymous function in ext_localconf.php leads to memoryleak in SystemBackendModule HOT 5
- Upgrade Wizard overwrites existing extension configuration HOT 2
- [feature request] Send a 500'er when the json api answers with a 'Oops, an error occurred!' HOT 6
- Adding decorator with new key in Plugin Typoscript configuration appends the item to the list instead of respecting the array key HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aimeos-typo3.