User tests: Successful: Unsuccessful:
Competition for #11938
Fix various problems with sqlsrv queries:
OFFSET
, which means use wrapped query to emulate offset. Every column in SELECT
statement required alias if it is placed in subquery.SELECT
contains a wild column x.*
then load and put all columns from x table to GROUP BY
GROUP BY
contains alias to (column or expression) then replace it with expression.SELECT LOWER(name) AS name, catid AS cc, count(*) ... GROUP BY name, cc
SELECT LOWER(name) AS name, count(*) ... GROUP BY LOWER(name), catid
ORDER BY
to GROUP BY if not yet exists. If this is an alias then replace it with expression as mentioned earlier.SELECT
to GROUP BY
if missing (related to mysql ONLY_FULL_GROUP_BY
). Probably it would be better to fix joomla queries than create such workaround.SELECT id, name, COUNT(*) FROM #__x GROUP BY id
SELECT id, name, COUNT(*) AS columnAlias0 FROM #__x GROUP BY id, name
Fixed issue: #11279
Removes notices, warnings and errors from:
Fix issue with Popular Tags module on the front end.
Be sure that you can see PHP Notices.
Test above links and module Popular Tags before and after patch.
No
Status | New | ⇒ | Pending |
Category | ⇒ | MS SQL Libraries |
Labels |
Added:
?
|
Category | MS SQL Libraries | ⇒ | MS SQL Libraries Unit Tests |
Labels |
Added:
?
|
Title |
|
With current staging, testing data and your patch applied just go to the frontend. There are a lot of notices (something in the module helper). I have already shutdown my test pc, so I could give you the exact messages tomorrow.
I have found a few errors and I fixed it.
Please inform me if you find some errors.
With testing data installed frontend gives an "404 Component not found" error. Starting with index.php?option=com_content the page loads. The module helper notices are also present and no modul content is displayed.
In backend I get an error when deleting Banner Tracks:
An expression of non-boolean type specified in a context where a condition is expected, near ')'.
Can you have a look at Smart Search > Content Maps:
[Microsoft][SQL Server Native Client 11.0][SQL Server]Column "d.branch_title" is invalid in the ORDER BY clause because it is not contained in either an aggregate function or the GROUP BY clause.
I will take a look. Are you sure do you use the last commit in this PR, I added it today morning (night)?
I have several patches for mssql installed now and also this patch and now the problem with content map has gone away.
Frontend is broken nonetheless.
On test database I have found two 404 links because mssql table does not have 2 articles for:
but home page work for me ok.
This PR is ready to test:)
I tested with current staging with no samples data installed and clicked through the cms. I did not work out if it has anything to do with this patch:
Frontend - Home:
Serialization of 'Closure' is not allowed
Backend:
Multilingual Associations
Warning: ksort() expects parameter 2 to be long, string given in C:\Program Files (x86)\Ampps\www\joomla37\administrator\components\com_associations\models\fields\itemtype.php on line 57
Smart Search Indexer:
[Microsoft][SQL Server Native Client 11.0][SQL Server]Unclosed quotation mark after the character string 'O:19:"FinderIndexerResult":19:{s:11:"'.
Manage > Install Languages
[Microsoft][SQL Server Native Client 11.0][SQL Server]Unclosed quotation mark after the character string 'O:19:"FinderIndexerResult":19:{s:11:"'.
Warning: ksort() expects parameter 2 to be long
I assume this is php 5.3 issue, I have created an issue.
By the way: with the redirect plugin enabled I get 500 - PLG_SYSTEM_REDIRECT_ERROR_UPDATING_DATABASE
[Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Cannot insert the value NULL into column 'comment', table 'joomla.dbo.j37_redirect_links'; column does not allow nulls. INSERT fails.
This is unrelated.
I have found a big problem with sqlsrv updates in joomla (administrator/components/com_admin/sql/updates/sqlazure/*.sql).
A lots of that ALTER TABLE ALTER COLUMN has invalid syntax.
https://msdn.microsoft.com/en-us/library/ms190273.aspx
They are not executed to database at all. At least for my environment.
I need a little time to create an issue.
OK. Please wait a moment
Please ignore errors like:
Cannot insert the value NULL into column 'term_id', table 'joomla.dbo.#__finder_tokens_aggregate'; column does not allow nulls. INSERT fails.
It is unrelated, and it is waiting for new PR.
I have tested this item
Fixes these problems:
/administrator/index.php?option=com_banners
/administrator/index.php?option=com_categories&extension=com_banners
/administrator/index.php?option=com_banners&view=clients
/administrator/index.php?option=com_finder&view=maps
/administrator/index.php?option=com_categories&extension=com_newsfeeds
/administrator/index.php?option=com_categories&extension=com_contact
/administrator/index.php?option=com_postinstall
Thanks!
Last commit fix error on "sample testing" for menu items:
Compact tagged: should show one record
Tagged items: should show one record
For All tags the is other error which has to be resolved by separate PR.
DB function failed with error number 169
[Microsoft][ODBC Driver 13 for SQL Server][SQL Server]A column has been specified more than once in the order by list. Columns in the order by list must be unique.
SQL =SELECT TOP 20 a.*
FROM [#__tags] AS a
WHERE [a].[access] IN (1,5,1) AND [a].[parent_id] <> 0 AND [a].[title] LIKE N'%[gl]%' AND . [a].[published] = 1
ORDER BY [title] ASC, a.title ASC[Microsoft][ODBC Driver 13 for SQL Server][SQL Server]A column has been specified more than once in the order by list. Columns in the order by list must be unique.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-02-25 12:28:42 |
Closed_By | ⇒ | wilsonge |
Merged with waaders test given this is only affecting mssql
Thanks
@csthomas Will you consider making these changes to the Framework also?
@waader Which URL page or sql query did not work?