Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException

Issue #27 resolved
Wolfgang Wagner created an issue

In two TYPO3 12.4.3 installations I get an error message in the frontend as soon as I include the plugin on a page.

One installation was an upgrade from TYPO3 11, the other is a fresh and otherwise empty installation that I created just for testing.

(1/1) Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException
You have requested a non-existent service "Reelworx\RxShariff\Controller\ShariffController".

Comments (7)

  1. Markus Klein

    I just noticed we lack a Configuration/Services.yaml which explains a lot. Just pushed a fix to master. Can you maybe test with this version?
    If it works for you, I’ll create a new release.

  2. Wolfgang Wagner reporter

    Hi Markus,
    thank you for your quick reaction!

    If I add the Services.yaml, I get the following error in backend and frontend:

    (1/1) Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
    Expected to find class "Reelworx\RxShariff\Shariff\Backend" in file "/html/typo3-composer/vendor/reelworx/rx-shariff/Classes/Shariff/Backend.php" while importing services from resource "../Classes/*", but it was not found! Check the namespace prefix used with the resource.
    

  3. Markus Klein

    Ah damn it. We have 2 namespaces here in the same folder an DI obviously does not like that. Sorry for just pushing changes blindly at the moment, I do not have the resources to test this on my own currently.

    I pushed another change.

  4. Wolfgang Wagner reporter

    Ok, with a little change it works now:

    In the Services.yaml you wrote:
    Reelworx\RxShariff\Controller:

    But it has to be:

    Reelworx\RxShariff\Controller\:

    Thank you!

  5. Log in to comment