Hi
1) I copy this module to module folder.
2) Add dependencies libraries and context module.
3) Download the latest library mobiledetect.net and copy it to sites/all/libraries/Mobile_Detect
4) I add

include DRUPAL_ROOT . '/sites/all/modules/context_mobile_detect/settings.inc' 

in my settings.php
5) I switched On this module.

I have not seen the new context (Mobile Device & Mobile Device Type) in panel and anywhere :(

How I can hide my minipanel using this module?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pvasili created an issue. See original summary.

pvasili’s picture

Fatal error: Call to undefined function module_exists() in ..\sites\all\modules\context_mobile_detect\context_mobile_detect.module on line 92
at /admin/modules :( :( :(

sriharsha.uppuluri’s picture

module_exists is a core function. I have added the patch check it once

asPagurus’s picture

I have the same problem
In block:
if (module_exists('libraries')) {
$library_path = '/' . libraries_get_path('Mobile_Detect');
}
else {
$library_path = MOBILE_DETECT_LIBRARY_PATH;
}
variable_set('context_mobile_detect_library_path', $library_path);

first blank screen I've got in "module_exists('libraries')"
second (if I commented that) - in variable_set - when drupal try to db_merge
I have thoughts about it but I haven't enough expierence for this.

Than I commented all that block and place only
$library_path = MOBILE_DETECT_LIBRARY_PATH;
instead.

All is working.
Yes, Mobile_Detect library I place to standart folder. But it gives the oportunity of module working.

UPDATE: Sorry. All of this I need to get context in panels with https://www.drupal.org/project/context_mobile_detect/issues/1798112#comm...
And after my changes context in panels works. But in blocks I don't see context tab
Context UI works. Though in Administration/Structure/Context I can configure needed conditions and reactions

apaderno’s picture

Category: Bug report » Support request
Priority: Critical » Normal
Issue tags: -Module not working correctly