I just install jquerymobile and when I load the page I got this:

Notice: Undefined index: autoinitializepage in _jquerymobile_build_js() (line 78 of /home/deb29871n2/domains/avlis.nl/public_html/drukkers/sites/all/modules/jquerymobile/jquerymobile.inc).
Notice: Undefined index: subpageurlkey in _jquerymobile_build_js() (line 79 of /home/deb29871n2/domains/avlis.nl/public_html/drukkers/sites/all/modules/jquerymobile/jquerymobile.inc).
Notice: Undefined index: activepageclass in _jquerymobile_build_js() (line 80 of /home/deb29871n2/domains/avlis.nl/public_html/drukkers/sites/all/modules/jquerymobile/jquerymobile.inc).
Notice: Undefined index: activebtnclass in _jquerymobile_build_js() (line 81 of /home/deb29871n2/domains/avlis.nl/public_html/drukkers/sites/all/modules/jquerymobile/jquerymobile.inc).
Notice: Undefined index: ajaxenabled in _jquerymobile_build_js() (line 82 of /home/deb29871n2/domains/avlis.nl/public_html/drukkers/sites/all/modules/jquerymobile/jquerymobile.inc).
Notice: Undefined index: hashlisteningenabled in _jquerymobile_build_js() (line 83 of /home/deb29871n2/domains/avlis.nl/public_html/drukkers/sites/all/modules/jquerymobile/jquerymobile.inc).
Notice: Undefined index: defaultpagetransition in _jquerymobile_build_js() (line 84 of /home/deb29871n2/domains/avlis.nl/public_html/drukkers/sites/all/modules/jquerymobile/jquerymobile.inc).
Notice: Undefined index: defaultdialogtransition in _jquerymobile_build_js() (line 85 of /home/deb29871n2/domains/avlis.nl/public_html/drukkers/sites/all/modules/jquerymobile/jquerymobile.inc).
Notice: Undefined index: loadingmessage in _jquerymobile_build_js() (line 86 of /home/deb29871n2/domains/avlis.nl/public_html/drukkers/sites/all/modules/jquerymobile/jquerymobile.inc).
Notice: Undefined index: loadingmessage in _jquerymobile_build_js() (line 87 of /home/deb29871n2/domains/avlis.nl/public_html/drukkers/sites/all/modules/jquerymobile/jquerymobile.inc).
Notice: Undefined index: pageloaderrormessage in _jquerymobile_build_js() (line 88 of /home/deb29871n2/domains/avlis.nl/public_html/drukkers/sites/all/modules/jquerymobile/jquerymobile.inc).
Notice: Undefined index: linkbindingenabled in _jquerymobile_build_js() (line 89 of /home/deb29871n2/domains/avlis.nl/public_html/drukkers/sites/all/modules/jquerymobile/jquerymobile.inc).
Notice: Undefined index: pushstateenabled in _jquerymobile_build_js() (line 90 of /home/deb29871n2/domains/avlis.nl/public_html/drukkers/sites/all/modules/jquerymobile/jquerymobile.inc).
Notice: Undefined index: touchoverflowenabled in _jquerymobile_build_js() (line 91 of /home/deb29871n2/domains/avlis.nl/public_html/drukkers/sites/all/modules/jquerymobile/jquerymobile.inc).

there is a similar issue that puts the blame on the case of the vars. I tried those suggestions but with no luck.

Greetings,

Eduardo

Comments

voj’s picture

Me too...
It seems that the settings from the database cannot be read.

subscribe

IKE0088’s picture

same here...subscribe.

IKE0088’s picture

same here...subscribe.

JerryJ’s picture

Now just replace to dev version. and wait for next release

JoeRobertsPhotography’s picture

I think I found a fix for this. There are two issues.

Issue 1:

From this page admin/config/jquerymobile/settings after you check one of the Mobile Themes. Lets say I choose mobile_jquery. The page reloads and then gives you a tab at the top. When you go to this tab and make your selections and submit it. It reloads the page and nothing seems to have been saved. This issue is because the deault_value for each of the form elements is case sensitive. Example you have autoinitializepage and it should be autoInitializePage with the "I" and the "P" capitalized. This will fix the form.

FIX 1:
All you have to do is go in and update the jquerymobile.admin.inc file on line(s):

  • 172: change $settings['autoinitializepage'] to $settings['autoInitializePage ']
  • 180: change $settings['subpageurlkey'] to $settings['subPageUrlKey']
  • 187: change $settings['activepageclass'] to $settings['activePageClass']
  • 194: change $settings['activebtnclass'] to $settings['activeBtnClass']
  • 201: change $settings['ajaxenabled'] to $settings['ajaxEnabled']
  • 209: change $settings['linkbindingenabled'] to $settings['linkBindingEnabled']
  • 217: change $settings['hashlisteningenabled'] to $settings['hashListeningEnabled']
  • 225: change $settings['pushstateenabled'] to $settings['pushStateEnabled']
  • 233: change $settings['defaultpagetransition'] to $settings['defaultPageTransition']
  • 241: change $settings['touchoverflowenabled'] to $settings['touchOverflowEnabled']
  • 249: change $settings['defaultdialogtransition'] to $settings['defaultDialogTransition']
  • 257: change $settings['minscrollback'] to $settings['minScrollBack']
  • 264: change $settings['loadingmessage'] to $settings['loadingMessage']
  • 271: change $settings['pageloaderrormessage'] to $settings['pageLoadErrorMessage']

Second Issue:
The code for the function _jquerymobile_build_js() inside jquerymobile.module also needs to be udpated. The same issue as above. The capitalization of $settings array needs to match.

Fix 2:

Below is an updated copy of the function _jquerymobile_build_js():

function _jquerymobile_build_js() {
global $theme_key;

  $settings = _jquerymobile_get_settings($theme_key);
  
  $output = '';
  $output .= 'var jqm = jQuery.noConflict();' . "\n";
  $output .= 'jqm(document).bind("mobileinit", function() {' . "\n";
  $output .= "\n\t" . 'jqm.mobile.ns = "' . $settings['ns'] . '";';
  $output .= "\n\t" . 'jqm.mobile.autoInitializePage = ' . $settings['autoInitializePage'] . ';';
  $output .= "\n\t" . 'jqm.mobile.subPageUrlKey = "' . $settings['subPageUrlKey'] . '";';
  $output .= "\n\t" . 'jqm.mobile.activePageClass = "' . $settings['activePageClass'] . '";';
  $output .= "\n\t" . 'jqm.mobile.activeBtnClass = "' . $settings['activeBtnClass'] . '";'; 
  $output .= "\n\t" . 'jqm.mobile.ajaxEnabled = ' . $settings['ajaxEnabled'] . ';';
  $output .= "\n\t" . 'jqm.mobile.hashListeningEnabled = ' . $settings['hashListeningEnabled'] . ';';
  $output .= "\n\t" . 'jqm.mobile.defaultPageTransition = "' . $settings['defaultPageTransition'] . '";';
  $output .= "\n\t" . 'jqm.mobile.defaultDialogTransition = "' . $settings['defaultDialogTransition'] . '";';
  $output .= "\n\t" . 'jqm.mobile.minScrollBack = "' . $settings['minScrollBack'] . '";';
  $output .= "\n\t" . 'jqm.mobile.loadingMessage = "' . $settings['loadingMessage'] . '";';
  $output .= "\n\t" . 'jqm.mobile.pageLoadErrorMessage = "' . $settings['pageLoadErrorMessage'] . '";';
  $output .= "\n\t" . 'jqm.mobile.linkBindingEnabled = ' . $settings['linkBindingEnabled'] . ';';
  $output .= "\n\t" . 'jqm.mobile.pushStateEnabled = ' . $settings['pushStateEnabled'] . ';';
  $output .= "\n\t" . 'jqm.mobile.touchOverflowEnabled = ' . $settings['touchOverflowEnabled'] . ';';
  $output .= "\n});";
  
  
  
  return $output;
}

I hope that helps. These two issues only seem to come up if you change the default settings.

Thanks,
Joe

grient’s picture

Thanks Joe, seems to resolve the error. I found the _jquerymobile_build_js function in jquerymobile.inc though.

Cheers, Leon

geoffAuthor’s picture

Yes. I confirm this fix works. Should the module be updated with this?

jordan8037310’s picture

Just an FYI for anyone who stumbles upon this page with the same issue... The dev version has this fixed already even though there is no patch here.

kscheirer’s picture

Version: 7.x-2.0-beta1 » 7.x-2.x-dev
Priority: Major » Normal
Status: Active » Fixed

Yeah, this is fixed in dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

hanmant.sapkal’s picture

Edit for #5 ---- _jquerymobile_build_js() function is in jquerymobile.inc and not in jquerymobile.module