• Resolved AWOL

    (@awol)


    Hi,
    In the last few days I have started getting the below error appearing in my site’s error log;

    WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'where media_type IN ('photo','video','music') 
    	    	                        ...' at line 3 for query SELECT activity_id, media_type 
    	    	                       from  
    	    	                      where media_type IN ('photo','video','music') 
    	    	                        and context = 'group' 
    	    	                        and context_id = 1  
    	    	                        and blog_id = 1 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/blocksy/page.php'), get_template_part, locate_template, load_template, require('/themes/blocksy/single.php'), get_template_part, locate_template, load_template, require('/themes/blocksy/template-parts/single.php'), the_content, apply_filters('the_content'), WP_Hook->apply_filters, bp_replace_the_content, apply_filters('bp_replace_the_content'), WP_Hook->apply_filters, BP_Groups_Theme_Compat->single_content, bp_buffer_template_part, bp_get_template_part, bp_locate_template, load_template, require('/themes/blocksy-child/buddypress/groups/single/home.php'), bp_get_template_part, bp_locate_template, load_template, require('/themes/blocksy-child/buddypress/groups/single/cover-image-header.php'), do_action('bp_after_group_header'), WP_Hook->do_action, WP_Hook->apply_filters, bp_ap_rtmedia_update_group_medias_count

    The query SELECT and the very last part makes me think that this is to do with your plugin, but if it is not I apologise and would appreciate any suggestions as to what might be causing it. I should add that there are 3 slightly different versions of this error, with the only difference being the number in context_id = 1 ( 2 or 3 being the others) which I think might relate to the id number of the Buddypress Groups. I am using the most up to date versions of WordPress and your plugin, and all other plugins are also up to date, and at present the site is on PHP 7.4, if that is in any way relevant. I am trying to work out if anything occurred on the date the errors started (first one was on 27-Sep-2022 21:42:27 UTC) but as things are being tested it is difficult to know.The only new plugin added that day was Buddypress Global Search but as these errors are not frequent (4 in total), if I deactivate that plugin I’m not going to know one way or another if it is the cause, but given the little I understand about such errors I think it is unlikely to be.

    As far as I can tell, so far these errors are not affecting anything to do with how the site is operating, but we are still in a test phase, so it could be that something will be affected under certain conditions. As mentioned they are not very frequent, so are probably only triggered by either a visit to a certain page or carrying out a certain action, which I have not yet been able to work out. Any help that is forthcoming would be most appreciated.

    P.S.
    I think I have just discovered what triggers the error – when I visit the home page of a group a new error appears and (as I suspected) the context_id changes to the group’s id.

    • This topic was modified 2 years, 5 months ago by AWOL.
    • This topic was modified 2 years, 5 months ago by AWOL.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Pooja Killekar (Muchandikar)

    (@pooja1210)

    Hi @awol,

    Sorry for the inconvenience you are facing at your end..

    We will check the issue and get back to you soon.

    Regards,
    Pooja

    Plugin Contributor Pooja Killekar (Muchandikar)

    (@pooja1210)

    Hi @awol,

    We tried to reproduce the issue at our end but unfortunately we were not able to reproduce it, could you share more details on it?

    > I think I have just discovered what triggers the error – when I visit the home page of a group a new error appears and (as I suspected) the context_id changes to the group’s id.

    Are you facing issue specifically on Group homepage only? If yes then it could be some issue with BuddyPress Group’s functionality..

    More details on the issue would help us to debug the issue further.

    I hope you understand.

    Regards,
    Pooja

    Thread Starter AWOL

    (@awol)

    Hi @pooja1210 ,
    Yes the error is only being logged when someone visits a Group home page. I’m not sure what further detail I can give you though as it doesn’t seem to affect the site visibly. I will continue to dig around in the code to see if I can find anything. I think it might be connected to a setting change I made though, because I turned on the Group Messaging facility around the same time, so I will experiment by turning it off again to see if the errors stop. Although I’m not quite sure why that would trigger the error being logged. I will update here on the result though.

    Plugin Contributor Pooja Killekar (Muchandikar)

    (@pooja1210)

    Sure, do let us know if you need any further assistance.

    Thread Starter AWOL

    (@awol)

    Turning off group messaging made no difference, the errors still occur. And things are more serious than I thought – no media is being uploaded. The process of posting works but the post only has text, no media when published, and nothing in the Media tab for the user Profile or Group > Media tab. I don’t know if the error is connected to this, but obviously this is a big problem as it is the core function of your plugin. I am going to see if another plugin is conflicting but would appreciate your assistance, especially if there are any known plugins that conflict, or other things that can cause your plugin to fail.
    UPDATE: the error in the error log has been eliminated by deactivating a plugin – BuddyPress Activity Privacy – BUT it is still not possible to upload any media

    • This reply was modified 2 years, 5 months ago by AWOL.
    • This reply was modified 2 years, 5 months ago by AWOL.
    Plugin Contributor Pooja Killekar (Muchandikar)

    (@pooja1210)

    Hi @awol,

    It could be a conflict with a third party plugin/theme. Please deactivate all plugins except BuddyPress and rtMedia and install and activate any default WordPress theme. Please check if you still face the same issue.

    Note: Recommended to perform the above action on staging site not on production site.

    Let us know if you still face the issue.

    Regards,
    Pooja

    Thread Starter AWOL

    (@awol)

    Hi @pooja1210,
    I will see what I can try tomorrow; I did try deactivating the plugins earlier with my current theme still active, but of course it caused a critical error because of the custom code in my child theme, So it is going to be difficult to know whether the theme is at fault, although I am doubtful it is (I am using a child theme of Blocksy), but I will try first of all swapping to the WP default, then deactivate plugins. If the problem is still there at that point then we will know it is your plugin, otherwise it will be a case of activating the plugins one by one. So that’s my Saturday sorted!

    Plugin Contributor Pooja Killekar (Muchandikar)

    (@pooja1210)

    Hi @awol,

    I hope you are doing good!

    Were you able to find the root cause of the issue? Do you need any further assistance?

    Thread Starter AWOL

    (@awol)

    @pooja1210, I have managed to rectify the problem, but I can’t actually remember right now what was causing it, but I think it was a plugin conflict. Sorry for not responding before.

    Plugin Contributor Pooja Killekar (Muchandikar)

    (@pooja1210)

    No problem @awol,

    Let me know if you need any further assistance.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Error in site error_log (cPanel File Manager)’ is closed to new replies.