?
avatar julienV
julienV
18 May 2015

The current splitSql function is very flawed, as it doesn't support basic comments, or more complex procedures and transactions.

as a consequence, if you have a comment followed by a query in your component sql update files, the query will be ignored.

for example, this will be seen as a comment instead of one comment + 1 query

# this is my comment
UPDATE TABLE #__example_table ADD column eg VARCHAR(255);

Steps to reproduce the issue

Create a new sql update file for a component in the installer zip, adding some dummy column, like above

Expected result

the query should run

Actual result

the query just following the comment is ignored

System information (as much as possible)

Additional comments

This is undocumented, and very hard to debug for extensions maintainers, as putting comment happens ;)

avatar julienV julienV - open - 18 May 2015
avatar julienV julienV - change - 18 May 2015
Build 3.2.4 staging
avatar julienV julienV - change - 18 May 2015
The description was changed
avatar julienV julienV - change - 18 May 2015
The description was changed
avatar vdespa
vdespa - comment - 24 May 2015

SQL update files do not work well with C style comments (# comment).

Did you try using comments like:

-- comment

Not sure, but you may also try to write a comment with

/* Comment */

Looking forward to your feedback.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6975.

avatar wilsonge
wilsonge - comment - 29 May 2015

@mbabker something to address in the framework as well

avatar julienV
julienV - comment - 29 May 2015

i checked, it works with --comment and /* comment*/
so it's just with # comment that there is an issue

avatar brianteeman
brianteeman - comment - 28 Jan 2016

I am going to close this at this time as a method has been shown for comments that works


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6975.

avatar brianteeman brianteeman - change - 28 Jan 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-01-28 13:11:57
Closed_By brianteeman
avatar brianteeman brianteeman - close - 28 Jan 2016
avatar brianteeman brianteeman - close - 28 Jan 2016

Add a Comment

Login with GitHub to post a comment