• Resolved plokamias

    (@plokamias)


    Hello there guys,

    Before coming here I’ve contacted my theme support that guided me in contacting you.

    When I choose for the theme to display blog posts in the home page, it brings up also lessons from Masterstudy plugin.

    It only happens when both masterstudy and woocommerce are active at the same time. When either woocommerce or masterstudy is disabled, the issue does not occur.

    You can see the issue happening at the page, under the title “Popular NLP Certifications & Seminars
    Skills”

    Here is also the link of the theme support discussion https://kriesi.at/support/topic/blog-post-element-broken-when-woocommerce-is-activated/ (no need to log in to read it).

    Their conclusion is that “…`And the reason why the blog posts element display all posts when the plugins are enabled is because the default query..

    SELECT wp_posts.*
    FROM wp_posts
    LEFT JOIN wp_term_relationships
    ON (wp_posts.ID = wp_term_relationships.object_id)
    WHERE 1=1
    AND ( wp_term_relationships.term_taxonomy_id IN (4) )
    AND wp_posts.post_type IN (‘post’, ‘page’, ‘attachment’, ‘revision’, ‘nav_menu_item’, ‘custom_css’, ‘customize_changeset’, ‘oembed_cache’, ‘user_request’, ‘wp_block’, ‘wp_template’, ‘scheduled-action’, ‘product’, ‘product_variation’, ‘shop_order’, ‘shop_order_refund’, ‘shop_coupon’, ‘portfolio’, ‘avia_framework_post’)
    AND (wp_posts.post_status = ‘publish’
    OR wp_posts.post_author = 13
    AND wp_posts.post_status = ‘private’)
    GROUP BY wp_posts.ID
    ORDER BY wp_posts.post_date DESC
    .. gets transformed to..

    SELECT wp_posts.*
    FROM wp_posts
    WHERE 1=1
    AND wp_posts.post_type IN (‘post’, ‘page’, ‘attachment’, ‘revision’, ‘nav_menu_item’, ‘custom_css’, ‘customize_changeset’, ‘oembed_cache’, ‘user_request’, ‘wp_block’, ‘wp_template’, ‘product’, ‘product_variation’, ‘shop_order’, ‘shop_order_refund’, ‘shop_coupon’, ‘stm-courses’, ‘stm-lessons’, ‘stm-quizzes’, ‘stm-questions’, ‘stm-reviews’, ‘stm-orders’, ‘stm-payout’, ‘portfolio’, ‘avia_framework_post’)
    AND (wp_posts.post_status = ‘publish’
    OR wp_posts.post_author = 13
    AND wp_posts.post_status = ‘private’)
    GROUP BY wp_posts.ID
    ORDER BY wp_posts.post_date DESC
    .. and this part of the query that is supposed to retrieve posts from the selected category gets omitted.

    LEFT JOIN wp_term_relationships
    ON (wp_posts.ID = wp_term_relationships.object_id)
    It is possible that the plugin is using the pre_get_posts filter somewhere in its code base and overrides the blog posts query. You may need to contact the developers of the Master Study LMS plugin for additional assistance regarding the issue.`

    Can you please kindly assist me in resolving this?

    Best regards,

    Victor

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support EricStylemixThemes

    (@ericstylemixthemes)

    Hello,

    Thank you for reaching out!

    I checked this issue in our testing environment by activating the default theme of WordPress (Twenty Twenty-One). By default, the theme shows the latest Blog posts.

    Then, I installed and activated the WooCommerce plugin, and checked the homepage. There only blog posts appeared and lessons did not appear (Screenshot).

    You can also recheck this issue by switching to the default theme for a while.

    I checked your conversation with your theme support team and saw you also have the Masterstudy LMS Pro plugin.

    If you purchased a premium version of the plugin, we have a dedicated platform to support our customers. Leave your question using the link below and our agents will answer you with great pleasure. Furthermore, it helps us to discuss the problem in detail.

    https://support.stylemixthemes.com/tickets/new/support?item_id=26

    Kind regards

    Thread Starter plokamias

    (@plokamias)

    Hello there Eric,

    Thank you for the reply. Is there any reason to contact support from there too, or the answer will still be “the default theme does not appear to cause an issue so we don’t care”?.

    Best regards

    Dear @plokamias

    If you have active support, it would be much better to create a ticket in our support system, as was mentioned previously, we couldn’t determine your mentioned issue on our side and some of our customers’ websites as we checked all in detail.

    If you will create a ticket, we will debug it all directly on your website.

    regards

    Thread Starter plokamias

    (@plokamias)

    Hello there again,

    The theme developers are willing to try and debug this but they are kindly asking for the following information:

    “It is possible that the plugin is using the pre_get_posts filter somewhere in its code base and overrides the blog posts query. Please try to forward the above statement to the plugin developers, or just ask them if the pre_get_posts filter is used or added somewhere in the plugin.”

    Can you please kindly provide the following information so they can assist me with the issue?

    Thank you in advance for the reply.

    Best regards,

    Victor

    dianastylemixthemes

    (@dianastylemixthemes)

    Hi @plokamias ,

    Please note that our plugin is not fully compatible with your theme.
    Try to replace the code under this line- masterstudy-lms-learning-management-system/lms/classes/instructors.php line: 28

    With this code:

    if (is_admin()) {
        add_filter('pre_get_posts', 'STM_LMS_Instructor::posts_for_current_author');
    }

    Then please inform if it helped and our developers will add this code for the plugin update.

    Best regards,

    • This reply was modified 3 years, 1 month ago by Yui.
    • This reply was modified 3 years, 1 month ago by dianastylemixthemes.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Blog posts bring up lessons from Masterstudy’ is closed to new replies.