I am updating my J3 component to J4 and have come across a major problem
and example of my query.
$query->select($db->quoteName(array('r.rid' , 'e.id', 'r.firstname', 'r.lastname', 'r.email', 'e.titel', 'l.club', 'l.url', 'l.city',
'l.plz', 'l.street', 'l.country', 'l.locdescription','e.status', 'e.email_reminder', 'e.dates', 'e.times',
'e.enddates', 'e.endtimes', 'e.shortdescription', 'e.datdescription'),array('uid','eid',null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null)))
->from($db->quoteName('#__registrationmanagerking_events','e'))
->from($db->quoteName('#__registrationmanagerking_locate','l'))
->from($db->quoteName('#__registrationmanagerking_register','r'))
->where($db->quoteName('r.notified') . ' =0 ','and')
->where($db->quoteName('r.status') . ' =1 ','and')
->where($db->quoteName('e.id') . ' = '.$db->quoteName('r.rdid'),'and')
->where($db->quoteName('l.id') . ' = '.$db->quoteName('e.locid'),'and')
->where($db->quoteName('e.published') . ' =1 ','and')
->where($db->quote($current_date) .'>= DATE_SUB(e.dates ,INTERVAL e.notifydate DAY)','and')
->where($db->quoteName('e.notifydate') . ' !=0 ','and')
->where($db->quoteName('e.status') . ' !=2 ')
->group($db->quoteName('r.rid'));
I ONLY want to group by r.rid and nothing else.
Joomla! 4 requires me to add ALL the fields in my field select list, in the group clause.
I can see this in the core components, but I think this is VERY wrong.
Not only is it wrong, but it will stop almost EVERY Joomla! commercial and free component from working.
It seems very Unnecessary to have made this change.
yeah but why FORCE strict mode?
It is only my opinion but I think this is s horrible decision.
you are forcing more and more core changes to extensions and pushing away more and more developers.
The forced strict mode was already removed due to backlash.
What a pity.
@rgjoyce honestly i don't know why you stumbled into this issue. The decision has already been to remove the strict mode for group by so it can't depend on Joomla 4 because it doesn't force MySQL only full group by. Maybe you are using an old nightly build.
Joomla 4 currently uses the following SQL modes:
'STRICT_TRANS_TABLES',
'ERROR_FOR_DIVISION_BY_ZERO',
'NO_AUTO_CREATE_USER',
'NO_ENGINE_SUBSTITUTION'
Closing issue. Already addressed.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-12-14 16:02:02 |
Closed_By | ⇒ | mbabker |
I use the version downloadable from the Joomla.org site yesterday
From: JoeforJoomla Boy [mailto:notifications@github.com]
Sent: Friday, December 14, 2018 9:56 PM
To: joomla/joomla-cms
Cc: rgjoyce; Mention
Subject: Re: [joomla/joomla-cms] sql query using group by requires me to add all the fields in my select as fields in the groupby clause (#23282)
@rgjoyce https://github.com/rgjoyce honestly i don't know why you stumbled into this issue. The decision has already been to remove the strict mode so it can't depend on Joomla 4 because it doesn't force MySQL only full group by. Maybe you are using an old nightly build.
Joomla 4 currently uses the following SQL modes:
'STRICT_TRANS_TABLES',
'ERROR_FOR_DIVISION_BY_ZERO',
'NO_AUTO_CREATE_USER',
'NO_ENGINE_SUBSTITUTION'
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #23282 (comment) , or mute the thread https://github.com/notifications/unsubscribe-auth/AFMGLJib4cDSpFrw3V_uSl86saiN0RD9ks5u48n4gaJpZM4ZTabT . https://github.com/notifications/beacon/AFMGLPK8uoIRyV62krwGBb0bom6mTSe6ks5u48n4gaJpZM4ZTabT.gif
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
that's SQL and it is not wrong