permalinks problem with latest plugin

6 posts by 3 authors in: Forums > CMS Builder
Last Post: May 24, 2017   (RSS)

By zaba - May 12, 2017

permalinks_1-07

CMS Builder v3.09

Clean install.

A bunch of errors, but I fixed them by changing all mysql instances (in all permalink plugin files) to mysqli in all files and also commenting out the following in permalinks_cmsMenus.php

  // v1.01 upgrade - set old flag on all but the latest permalinks
/*
  if ($upgradeTo101) {
    $allAsOldQuery = "UPDATE {$TABLE_PREFIX}_permalinks SET `old` = 1";
    mysqli_query($allAsOldQuery) or die("mysqli Error: ". htmlencode(mysqli_error()) . "\n");

    $latestAsNewQuery = "UPDATE {$TABLE_PREFIX}_permalinks p1
                           JOIN (SELECT recordNum, MAX(updatedDate) as updatedDate FROM {$TABLE_PREFIX}_permalinks GROUP BY tableName, recordNum) as p2
                             ON p1.recordNum = p2.recordNum AND p1.updatedDate = p2.updatedDate
                            SET old = 0";
    mysqli_query($latestAsNewQuery) or die("mysqli Error: ". htmlencode(mysqli_error()) . "\n");
  }
*/

Not sure yet if this will have any adverse effects, please could you check it out. Sorry didn't make a note of the error messages but I am sure you could replicate.

By ross - May 16, 2017

Hi zaba

Could you double check you are using the latest version of the Permalinks plugin?

The reason I ask is because I can only find the code snippet you posted in version 1.00 to version 1.02. 

That code doesn't exist in Permalinks 1.07 and there are no direct calls to "mysql_query" in Permalinks 1.07.

Let me know how you make out.

Thanks!

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

By zaba - May 19, 2017

Ive deleted the plugin from the plugin folder and re-downloaded the plugin, then uploaded the permalink folder to the cms.

This is the error I get on first launch..

Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/sites/XXXXXX/public_html/cms/plugins/permalinks/permalinks_cmsMenus.php on line 31 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /var/sites/XXXXXX/public_html/cms/plugins/permalinks/permalinks_cmsMenus.php on line 31 Warning: mysql_query(): A link to the server could not be established in /var/sites/XXXXXX/public_html/cms/plugins/permalinks/permalinks_cmsMenus.php on line 31 MySQL Error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

By zaba - May 24, 2017

Tried to install (activate) the updated version.

get an error.

MySQL Error - by permalink_cms_onInstallCreateSchemas()

By Dave - May 24, 2017

Thanks Zaba, 

I've posted a temporary fix on this thread and we're working on an official patch: 
https://www.interactivetools.com/forum/forum-posts.php?postNum=2240590#post2240590

Can you reply on that thread.  Thanks!

Dave Edis - Senior Developer
interactivetools.com