SQL plugin didn't trigger

13 years 8 months ago #139008 by amazeika
SQL plugin didn't trigger was created by amazeika
Hello guys,

I would like to report a problem that I experienced a few times. I use the SQL plugin to trigger some queries when a subscription is activated/deactivated. They control access to my phpBB3 forum by just adding/removing the user to the corresponding group.

Sometimes, subscribers do not get added to the groups. This is very rare, but it has happened before. Is there anything in the logs that I could check to see if the SQL plugin triggered, etc. ?, a subscriber of mine just experienced the issue, so I could go and check for his logs.

What might be the cause of this issue ?. There's no problem with the queries, user permission, etc. since as I just pointed out, it normally works without problems and there seems to be no logical pattern for this error.

I'm using CBSubs 1.0.3 with CB 1.2.3.

Thank you in advance.

Best regards,

Arunas

Arunas Mazeika
WeXtend.com - Professional development for Joomla!.

Please Log in to join the conversation.

13 years 8 months ago #139018 by nant
Replied by nant on topic Re:SQL plugin didn't trigger
to test add an sql statement that never fails.

perhaps your query is failing because of the way other plugins work.

Please Log in to join the conversation.

13 years 8 months ago #139072 by amazeika
Replied by amazeika on topic Re:SQL plugin didn't trigger
Hello Nick,

By following your advice and having knowledge on the user that was involved, I went ahead and tried to reproduce the issue by executing the queries of the stored procedure that I've set in the SQL plugin.

The problem wasn't originated by my queries, which are all good, I discovered a bug on the latest version of JFusion, the bridge that I'm using for phpBB3.

In the stored proc, I was using the email field as the join between the Joomla and phpBB3 tables. JFusion is creating users in phpBB3 by lower casing the e-mail field, which is wrong, as the username part of the e-mail is case sensitive. The user obviously had an e-mail with upper case characters. Even worst, the collation of the phpBB3 table is utf8_bin which makes queries case sensitive :side: . Because of this two conditions, the stored proc wasn't able to find the user in the phpBB3 table.

I fixed my problem by making the join over the username instead of the e-mail, which is exactly the same. I'm reporting the bug on JFusion ASAP.

Thank you for your message. I should update the tutorial I provided for integrating CBSubs with phpBB3 in the CBSubs forums to avoid this problem while the bug is still present in Jfusion.

Regards and thank you for your time.

Arunas

Arunas Mazeika
WeXtend.com - Professional development for Joomla!.

Please Log in to join the conversation.

13 years 8 months ago #139077 by nant
Replied by nant on topic Re:SQL plugin didn't trigger
Glad my small intervention helped and thank you for sharing your results and solution.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.709 seconds

Facebook Twitter LinkedIn