Notifications
Clear all

JQuery Menu Plugin

5 Posts
2 Users
0 Reactions
297 Views
(@nootkan)
Posts: 29
Eminent Member
Topic starter
 

Hi all, looking for someone who may be able to help debug this error from the Jquery Menu v 10.0 plugin that only occurs with osclass version 5.1.2 and not 8.0.2. 

Running both osclass versions on my local server with Wamp - Php 7.2.4, mysql 5.7.21, apache 2.4.33

Using same theme (one I purchased a while ago) on both versions of osclass successfully so that can't be the issue as the plugin works on one version of osclass (8.0.2) but not the other.

Tried with the default theme and still get the same error.

I am assuming it has something to do with the oclass core in 5.1.2 but having troubles locating possible source. 

Googled the function but not finding any answers I understand there either.

Any help greatly appreciated.

Error:

 Fatal error: Uncaught Error: Call to undefined function getConnection() in C:\wamp\www\website\oc-content\plugins\jquery_menu\index.php on line 13

( ! ) Error: Call to undefined function getConnection() in C:\wamp\www\website\oc-content\plugins\jquery_menu\index.php on line 13

Call Stack

#  Time      Memory    Function      Location

1  0.0007   389240   {main}( )      ...\index.php:0

2  0.3421  1246448   CAdminPlugins->doModel( )   ...\index.php:95

3  0.3472  1249632  Plugins::install( )   ...\CAdminPlugins.php:292

4  0.34761250168   Plugins::runHook( )  ...\Plugins.php:375

5  0.34761250216   jMenu_call_after_install( )  ...\Plugins.php:410

Here is the code line referrenced in index.php as per the error:

function jMenu_call_after_install() {
  $conn = getConnection() ;
  $path = osc_plugin_resource('jquery_menu/struct.sql') ;
  $sql  = file_get_contents($path) ;
  $conn->osc_dbImportSQL($sql) ;
  $conn = getConnection();
  $conn->autocommit(false);
  try {
    $conn->commit();
    osc_set_preference('parent-selectable', '1', 'plugin-jMenu', 'INTEGER');
    osc_set_preference('show-arrow', '1', 'plugin-jMenu', 'INTEGER');
    osc_set_preference('show-ad-count', '1', 'plugin-jMenu', 'INTEGER');
  } catch (Exception $e) {
    $conn->rollback();
    echo $e->getMessage();
  }
This topic was modified 2 years ago 2 times by nootkan
 
Posted : August 14, 2022 03:16
Editor
(@editor)
Posts: 553
Honorable Member Admin
 

I do remember that getConnection() was not needed and unused, and we removed it from Osclasswizards theme because of that exact crash as yours.

https://www.valueweb.gr/forums/osclass/osclass-3-9-0-released/#post-720

https://www.valueweb.gr/forums/osclass-free-themes/osclasswizards-free-theme-2-0-6-modified-for-osclass-5-mindstellar-release/#post-1338

 
Posted : August 14, 2022 11:50
(@nootkan)
Posts: 29
Eminent Member
Topic starter
 

Thanks for your reply.  That line of code doesn't exist in my theme files anywhere.  Because the plugin works fine in osclass 8.0.2, I thought it must be an  issue with the new version of osclass 5.1.2.

 
Posted : August 14, 2022 20:58
Editor
(@editor)
Posts: 553
Honorable Member Admin
 
Posted by: @nootkan

Thanks for your reply.  That line of code doesn't exist in my theme files anywhere.  Because the plugin works fine in osclass 8.0.2, I thought it must be an  issue with the new version of osclass 5.1.2.

I'm not talking about your theme, but about your crash. Same crash. I have no idea about ANY Osclasspoint versions, only for Mindstellar releases.

 
Posted : August 14, 2022 21:41
(@nootkan)
Posts: 29
Eminent Member
Topic starter
 

Hi thanks for your reply. 

The links you provided say to remove the code causing the error in the admin/category-icons.php line 10 and replace a line of code in the functions file of the osclasswizards theme so I assumed it would be the same with my theme.

I am using the mindstellar version 5.1.2 of osclass in my local server testing area.

I've gone through every file in both my theme and the mindstellar 5.1.2 version from here: https://github.com/mindstellar/Osclass/

and cannot find any instances of

$conn = getConnection();

anywhere in any files.  It only seems to exist inside the jquery menu plugin.

I only mentioned the osclassPoint version because I have it loaded in my test environment also and the errors don't exist with the jquery menu plugin in that version of osclass.

In any case, thank you for trying to help me I very much appreciate it.  I'll keep looking and see if I can figure it out. 

This post was modified 2 years ago by nootkan
 
Posted : August 15, 2022 02:32