suncat2000 / MobileDetectBundle

Symfony 2/3/4 bundle for detect mobile devices, manage mobile view and redirect to the mobile and tablet version.
397 stars 154 forks source link

Symfony 4: The profiler template "MobileDetectBundle:Collector:device.html.twig" for data collector "device.collector" does not exist. #125

Closed dhananjay88 closed 6 years ago

dhananjay88 commented 6 years ago

MobileDetect bundle 1.1.0 was working fine with Symfony 3.4 but after upgrading to Symfony 4, symfony toolbar stopped working because of the below error The profiler template "MobileDetectBundle:Collector:device.html.twig" for data collector "device.collector" does not exist.

Does this version (1.1.0) support Symfony 4?

xabbuh commented 6 years ago

see #123

ephp commented 6 years ago

I FIX!

security.html.twig:1 {% extends '@WebProfiler/Profiler/layout.html.twig' %}

listener.xml:25-31

        <service id="mobile_detect_bundle.device.collector" class="SunCat\MobileDetectBundle\DataCollector\DeviceDataCollector">
            <tag name="data_collector" template="@MobileDetect/Collector/device.html.twig" id="device.collector"/>
            <argument type="service" id="mobile_detect.device_view" />
            <call method="setRedirectConfig">
                <argument>%mobile_detect.redirect%</argument>
            </call>
        </service>
alexhoma commented 6 years ago

Hi! Is there any update of this issue? I'm running on:

Thank you :)

abarke commented 6 years ago

I have the same issue on PHP 7.1, Symfony 4 and MobileDetectBundle 1.1.0

image

abarke commented 6 years ago

@suncat2000 can you assist here? Would be a shame not to use this library.

Crikripex commented 6 years ago

Hi, I'm having the exact same error on the same configuration, did anyone find a way to fix this?

alexhoma commented 6 years ago

Hi @suncat2000! :)

Can you or anyone with write access to this repository review this PR about the Symfony4 support (#127) issue?

abarke commented 6 years ago

In still getting this issue in the web debug toolbar. Did someone test PHP 7 with Symfony 4?

suncat/mobile-detect-bundle: "1.1.0"

Please fix this as I would like to use the debug toolbar and mobile detect in Symfony.

xabbuh commented 6 years ago

There hasn't been any new release since #127 was merged.

suncat2000 commented 6 years ago

@abarke I add release v1.1.1

xabbuh commented 6 years ago

@suncat2000 I think you can close this issue then too. :)