CoursePress SQL error

We have an older version of Coursepress - 1.3.4.3. Due to some work we had done based on it, we cannot update it to the latest version, it will wreck our site completely. Now when we updated WP units started to disappear in the admin area. Sometimes frontend as well.

Here is the query with issue:

SELECT midnaynet_posts.*
FROM midnaynet_posts
WHERE 1=1
AND ( %1$s.post_type = 'module'
AND %1$s.post_parent IN (SELECT ID
FROM %1$s AS wpp
WHERE wpp.post_type = 'unit'
AND wpp.post_parent = %2$d)
OR (%1$s.post_type = 'unit'
AND %1$s.post_parent = %2$d ) )
AND ( %1$s.post_status = 'publish'
OR %1$s.post_status = 'draft' )
ORDER BY midnaynet_posts.menu_order ASC

Could you help us to sort this issue?

  • Kasia Swiderska
    • Support nomad

    Hello Ajay,

    I spoke with our manager and developer and I'm afraid in this situation we are not able to provide fix.
    CoursePress 1.3.4.3 is outdated version of plugin and we are not supporting this version anymore.
    If you customized plugin or you have customized theme for this version - then at the moment I can advise only to roll down to previous WordPress version where units were working correctly and in the meantime create a staging site and update CoursePress and then apply customizations you need for that version (or theme).

    I understand this is not answer that you expected, but when it comes to versions that old our hands are tied. We are not able to support over a year old plugin version.

    kind regards,
    Kasia

    • Ajay M Aravind
      • The Bug Hunter

      I understand you well Kasia. The main issue we are not able to update CPP is because of huge code base change in new version and till date that version is not stable.

      Now we had sorted the issue ourself after some proper reverse engineering. Problem was caused by wpdb->prepare function which was moved out in wp4.8. So we had re-written the query wherever it was used. Things are sorted for now.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.