-
-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in Wordpress plugin Ultimate Member #278
Comments
Do you have the PHP error log and/or the PN translation log file available? |
Debug switched on, output here: |
Sorry, what's the PN translation log? |
Can offer a little more; tried the (apparently) offending query in the debug log (above); seems to fail similarly when tried in SQL Server Management log, but is OK if double quotes are replaced by single quotes; related to SET QUOTED_IDENTIFIER { ON | OFF }? Could it be this simple? |
There are several things in SQL Server which break if this is left off, per I examined the translations, and seems that we have tightly controlled when double-quotes are replaced with single-quotes in order to prevent damaging post content. At the moment, I'm not settled on how we would catch this instance without causing more problems. There is a simple fix for it by editing a line in the plugin itself. /includes/core/class-query.php, line 97. Simply swap all single-quotes and double-quotes on that line and it should work properly. |
Looking through the rest of that same file, the bigger question is why they aren't using WP_Query or get_posts like they do elsewhere. This query which is giving you trouble seems to be the exception to their coding standards. |
If single quotes are used for literals in SQL, which is the preferred practice, then it doesn't matter about QUOTED_IDENTIFIER, so this seems to be the way to go, so line 97 in class-query.php goes |
Bug found in the Ultimate Member plugin for Wordpress. Reported to Ultimate Member, but their team showed that bug not manifest in a native MySQL host, hence possibly related to use of SqlServer / ProjectNami. Bug visible in this screenshot; evidently cannot see page definitions:
The text was updated successfully, but these errors were encountered: