Answers.Body: <p>Such a klutz: My local basePath was incorrect.
  Detect plugin was a red-herring.</p>
  
  <p>All solved</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-26T16:44:07.950Z
Answers.LastActivityDate: 2018-02-26T16:44:07.950Z
Answers.UserDisplayName: joomkit
Body: <p>I have a local, staging and production setup (Craft 2.6.3011).
  My local site is having a problem with transforms that seems to be related to the mobile detect plugin (I am using Mikkel Rummelhoff's <a href="https://github.com/mmikkel/Detect-Craft" rel="nofollow noreferrer">Detect Plugin</a>).</p>
  
  <p>The Detect code I'm using in my template is: <code>{% set isMobile = craft.detect.isMobile ? '1' : '0' %}</code></p>
  
  <p>The home page has four images that 404 with transform urls.
  If I look at the response I see the following errors:</p>
  
  <pre><code>Twig_Error_Runtime
  Neither the property "detect" nor one of the methods "detect()", "getdetect()"/"isdetect()" or "__call()" exist and have public access in class "Craft\CraftVariable" in "_includes/header.html" at line 102. (/mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Template.php:660)
  
  #0 /mylocaldevpath/craft/app/etc/templating/BaseTemplate.php(64): Twig_Template-&gt;getAttribute(Object(Craft\CraftVariable), 'detect', Array, 'any', false, false)
  #1 /mylocaldevpath/craft/storage/runtime/compiled_templates/f6/f671e04469d81f0dfda61111136d722fb954e341b7543ce8baa919e43343b4ae.php(244): Craft\BaseTemplate-&gt;getAttribute(Object(Craft\CraftVariable), 'detect', Array)
  #2 /mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_81873f0b87bd6a678f4bf938ed6516d87c5b9a4339fc9d6dfcf337b2f069a6f9-&gt;doDisplay(Array, Array)
  #3 /mylocaldevpath/craft/app/etc/templating/BaseTemplate.php(26): Twig_Template-&gt;displayWithErrorHandling(Array, Array)
  #4 /mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Template.php(403): Craft\BaseTemplate-&gt;displayWithErrorHandling(Array, Array)
  #5 /mylocaldevpath/craft/storage/runtime/compiled_templates/12/129e9e7cc1b6a86df018442a329dd1d6e1f7d9c31cb94b7b01ae6cfeff6f2ebd.php(198): Twig_Template-&gt;display(Array)
  #6 /mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_11ee36b35600746e068e6dd5ace4c2797e2ec35ca7d474eb36bb37f7250bd707-&gt;doDisplay(Array, Array)
  #7 /mylocaldevpath/craft/app/etc/templating/BaseTemplate.php(26): Twig_Template-&gt;displayWithErrorHandling(Array, Array)
  #8 /mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Template.php(403): Craft\BaseTemplate-&gt;displayWithErrorHandling(Array, Array)
  #9 /mylocaldevpath/craft/storage/runtime/compiled_templates/fe/fe5ea1b61c6d52fa030f7f1d75b2b4568bab6dfe912af74613b657eed595f6fe.php(43): Twig_Template-&gt;display(Array, Array)
  #10 /mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_455d61df868203e0a6669f803e3d1b9e9a10f94ed6abe1e14ec8e1bee9d1c1e1-&gt;doDisplay(Array, Array)
  #11 /mylocaldevpath/craft/app/etc/templating/BaseTemplate.php(26): Twig_Template-&gt;displayWithErrorHandling(Array, Array)
  #12 /mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Template.php(403): Craft\BaseTemplate-&gt;displayWithErrorHandling(Array, Array)
  #13 /mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Template.php(411): Twig_Template-&gt;display(Array)
  #14 /mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Environment.php(363): Twig_Template-&gt;render(Array)
  #15 /mylocaldevpath/craft/app/services/TemplatesService.php(256): Twig_Environment-&gt;render('404', Array)
  #16 /mylocaldevpath/craft/app/controllers/BaseController.php(74): Craft\TemplatesService-&gt;render('404', Array)
  #17 /mylocaldevpath/craft/app/controllers/TemplatesController.php(213): Craft\BaseController-&gt;renderTemplate('404', Array)
  #18 /mylocaldevpath/craft/app/framework/web/actions/CInlineAction.php(49): Craft\TemplatesController-&gt;actionRenderError()
  #19 /mylocaldevpath/craft/app/framework/web/CController.php(308): CInlineAction-&gt;runWithParams(Array)
  #20 /mylocaldevpath/craft/app/framework/web/CController.php(286): CController-&gt;runAction(Object(CInlineAction))
  #21 /mylocaldevpath/craft/app/framework/web/CController.php(265): CController-&gt;runActionWithFilters(Object(CInlineAction), Array)
  #22 /mylocaldevpath/craft/app/framework/web/CWebApplication.php(282): CController-&gt;run('renderError')
  #23 /mylocaldevpath/craft/app/framework/base/CErrorHandler.php(368): CWebApplication-&gt;runController('templates/rende...')
  #24 /mylocaldevpath/craft/app/etc/errors/ErrorHandler.php(281): CErrorHandler-&gt;renderError()
  #25 /mylocaldevpath/craft/app/framework/base/CErrorHandler.php(351): Craft\ErrorHandler-&gt;renderError()
  #26 /mylocaldevpath/craft/app/framework/base/CErrorHandler.php(218): CErrorHandler-&gt;renderException()
  #27 /mylocaldevpath/craft/app/etc/errors/ErrorHandler.php(145): CErrorHandler-&gt;handleException(Object(Craft\HttpException))
  #28 /mylocaldevpath/craft/app/framework/base/CErrorHandler.php(131): Craft\ErrorHandler-&gt;handleException(Object(Craft\HttpException))
  #29 /mylocaldevpath/craft/app/framework/base/CApplication.php(750): CErrorHandler-&gt;handle(Object(CExceptionEvent))
  #30 [internal function]: CApplication-&gt;handleException(Object(Craft\HttpException))
  #31 {main}
  </code></pre>
  
  <p>If I remove the plugin code from my template and rename the 'detect' plugin folder then I just get the 404s with no useful response. I have checked permissions for assets (macOS - MAMP Pro) and these seem fine. I can see the source images for the transforms but it always 404s the transform url.
  This is a multilingual site in 9 languages and works 100% perfect apart from this.</p>
  
  <p>Any ideas?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-26T14:36:31.697Z
Comments.Text: Can you edit your answer and include the snippet of Twig code that you're using to do the "detecting"? Looks like it's in `_includes/header.html`...
Comments.UserDisplayName: Jalen Davenport
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-26T15:09:36.127Z
Comments.Text: Did you install the plugin on all your environments? Because it says it could not find the plugin. And of course as already said we need your code
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-26T15:12:33.187Z
Comments.Text: Sites been deployed for over a year. Staging is working fine.
  It's just locally that i see this problem. Plugin is there and exists.
  Updated question with plugin code
Comments.UserDisplayName: joomkit
Tags: <image-transforms>
Title: Local dev issue with transform and detect plugin
ThreadText: # Local dev issue with transform and detect plugin
  
  (Asked by: username_0 on 2018-02-26)
  
  I have a local, staging and production setup (Craft 2.6.3011).
  My local site is having a problem with transforms that seems to be related to the mobile detect plugin (I am using Mikkel Rummelhoff's [Detect Plugin](https://github.com/mmikkel/Detect-Craft)).
  
  The Detect code I'm using in my template is: `{% set isMobile = craft.detect.isMobile ? '1' : '0' %}`
  
  The home page has four images that 404 with transform urls.
  If I look at the response I see the following errors:
  
  ```
  Twig_Error_Runtime
  Neither the property "detect" nor one of the methods "detect()", "getdetect()"/"isdetect()" or "__call()" exist and have public access in class "Craft\CraftVariable" in "_includes/header.html" at line 102. (/mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Template.php:660)
  
  #0 /mylocaldevpath/craft/app/etc/templating/BaseTemplate.php(64): Twig_Template->getAttribute(Object(Craft\CraftVariable), 'detect', Array, 'any', false, false)
  #1 /mylocaldevpath/craft/storage/runtime/compiled_templates/f6/f671e04469d81f0dfda61111136d722fb954e341b7543ce8baa919e43343b4ae.php(244): Craft\BaseTemplate->getAttribute(Object(Craft\CraftVariable), 'detect', Array)
  #2 /mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_81873f0b87bd6a678f4bf938ed6516d87c5b9a4339fc9d6dfcf337b2f069a6f9->doDisplay(Array, Array)
  #3 /mylocaldevpath/craft/app/etc/templating/BaseTemplate.php(26): Twig_Template->displayWithErrorHandling(Array, Array)
  #4 /mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Template.php(403): Craft\BaseTemplate->displayWithErrorHandling(Array, Array)
  #5 /mylocaldevpath/craft/storage/runtime/compiled_templates/12/129e9e7cc1b6a86df018442a329dd1d6e1f7d9c31cb94b7b01ae6cfeff6f2ebd.php(198): Twig_Template->display(Array)
  #6 /mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_11ee36b35600746e068e6dd5ace4c2797e2ec35ca7d474eb36bb37f7250bd707->doDisplay(Array, Array)
  #7 /mylocaldevpath/craft/app/etc/templating/BaseTemplate.php(26): Twig_Template->displayWithErrorHandling(Array, Array)
  #8 /mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Template.php(403): Craft\BaseTemplate->displayWithErrorHandling(Array, Array)
  #9 /mylocaldevpath/craft/storage/runtime/compiled_templates/fe/fe5ea1b61c6d52fa030f7f1d75b2b4568bab6dfe912af74613b657eed595f6fe.php(43): Twig_Template->display(Array, Array)
  #10 /mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_455d61df868203e0a6669f803e3d1b9e9a10f94ed6abe1e14ec8e1bee9d1c1e1->doDisplay(Array, Array)
  #11 /mylocaldevpath/craft/app/etc/templating/BaseTemplate.php(26): Twig_Template->displayWithErrorHandling(Array, Array)
  #12 /mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Template.php(403): Craft\BaseTemplate->displayWithErrorHandling(Array, Array)
  #13 /mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Template.php(411): Twig_Template->display(Array)
  #14 /mylocaldevpath/craft/app/vendor/twig/twig/lib/Twig/Environment.php(363): Twig_Template->render(Array)
  #15 /mylocaldevpath/craft/app/services/TemplatesService.php(256): Twig_Environment->render('404', Array)
  #16 /mylocaldevpath/craft/app/controllers/BaseController.php(74): Craft\TemplatesService->render('404', Array)
  #17 /mylocaldevpath/craft/app/controllers/TemplatesController.php(213): Craft\BaseController->renderTemplate('404', Array)
  #18 /mylocaldevpath/craft/app/framework/web/actions/CInlineAction.php(49): Craft\TemplatesController->actionRenderError()
  #19 /mylocaldevpath/craft/app/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
  #20 /mylocaldevpath/craft/app/framework/web/CController.php(286): CController->runAction(Object(CInlineAction))
  #21 /mylocaldevpath/craft/app/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
  #22 /mylocaldevpath/craft/app/framework/web/CWebApplication.php(282): CController->run('renderError')
  #23 /mylocaldevpath/craft/app/framework/base/CErrorHandler.php(368): CWebApplication->runController('templates/rende...')
  #24 /mylocaldevpath/craft/app/etc/errors/ErrorHandler.php(281): CErrorHandler->renderError()
  #25 /mylocaldevpath/craft/app/framework/base/CErrorHandler.php(351): Craft\ErrorHandler->renderError()
  #26 /mylocaldevpath/craft/app/framework/base/CErrorHandler.php(218): CErrorHandler->renderException()
  #27 /mylocaldevpath/craft/app/etc/errors/ErrorHandler.php(145): CErrorHandler->handleException(Object(Craft\HttpException))
  #28 /mylocaldevpath/craft/app/framework/base/CErrorHandler.php(131): Craft\ErrorHandler->handleException(Object(Craft\HttpException))
  #29 /mylocaldevpath/craft/app/framework/base/CApplication.php(750): CErrorHandler->handle(Object(CExceptionEvent))
  #30 [internal function]: CApplication->handleException(Object(Craft\HttpException))
  #31 {main}
  
  ```
  
  If I remove the plugin code from my template and rename the 'detect' plugin folder then I just get the 404s with no useful response. I have checked permissions for assets (macOS - MAMP Pro) and these seem fine. I can see the source images for the transforms but it always 404s the transform url.
  This is a multilingual site in 9 languages and works 100% perfect apart from this.
  
  Any ideas?
  
  **Tags:** image-transforms
  
  > **Comments:**
  > **username_1**: Can you edit your answer and include the snippet of Twig code that you're using to do the "detecting"? Looks like it's in `_includes/header.html`...  
  > **username_2**: Did you install the plugin on all your environments? Because it says it could not find the plugin. And of course as already said we need your code  
  > **username_0**: Sites been deployed for over a year. Staging is working fine. It's just locally that i see this problem. Plugin is there and exists. Updated question with plugin code  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-02-26. Score: 1
  
  Such a klutz: My local basePath was incorrect.
  Detect plugin was a red-herring.
  
  All solved
  
  
  ---
  
  