Comments (5)
Did you update your composer dependencies using composer update
on your server after adding the bundle? Also, you might need to clear some caches in production environment bin/console cache:clear
, etc...
from mobiledetectbundle.
Yes, I've updatet my composer and I cleaned my cache. Few minutes ago I've reinstalled the bundle, but it is giving me the same error.
P.S: I'm on Nginx, but theoretically this should not affect.
from mobiledetectbundle.
Well guys, I finally solved the problem.
I changed the method to import MobileDetector. I put this code on top of the file:
use SunCat\MobileDetectBundle\DeviceDetector\MobileDetector;
and in the function:
$mobileDetector = new MobileDetector();
And that's all! Problem solved.
from mobiledetectbundle.
Well, by manually instantiating MobileDetector, you're not using the service container...
Is the bundle being loaded in AppKernel without environment condition?
You might try bin/console container:debug
in your production environment (be sure you're using the prod environment on your CLI) and see whether mobile_detect.mobile_detector
is present or not. If it's not, you're obviously not loading the bundle.
Hope that helps :)
from mobiledetectbundle.
Yes, it's present in container:debug
. I don't know the problem with my installation, but anyway, now it works!
from mobiledetectbundle.
Related Issues (20)
- Deal with cookie & http proxy cache HOT 1
- Detects iPad as isMobile() HOT 2
- device_view cookie does not respect framework cookie configuration HOT 7
- Not configurable server status code on switch param redirect HOT 2
- Symfony 3.3 deprecated service declaration HOT 2
- SF 3.2.13 compatibility ? HOT 2
- Issue when building an old project with PHP 7 HOT 2
- Is this bundle still maintained? HOT 3
- Symfony 4: The profiler template "MobileDetectBundle:Collector:device.html.twig" for data collector "device.collector" does not exist. HOT 11
- Get null on all?
- Tablet is detected as mobile HOT 2
- getCurrentView() or similar
- service or alias has been removed or inlined when the container was compiled HOT 4
- A tree builder without a root node is deprecated since Symfony 4.2 and will not be supported anymore in 5.0. HOT 2
- Check browser in Twig HOT 1
- [Feature request] Add configuration do disable or enable debug bar HOT 1
- [Question] Is this project dead/abandoned? HOT 19
- How can I install this bundle in symfony 5 HOT 4
- Deprecation Notice on PSR-0
- Abandoned in favor of `tattali/mobile-detect-bundle` HOT 3
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 mobiledetectbundle.