? Success

User tests: Successful: Unsuccessful:

avatar Eighke
Eighke
11 Feb 2015

Hi there,

A small glitch. If we use a custom primary key name the SQL returns an error because the c.id is hardcoded.

JLanguageAssociations::getAssociations(
    'com_mytables',
    '#__mytables',
    'com_mytables.item',
    1, 
    'myId',
    'customAlias'
);
#1054 - Unknown column 'c.id' in 'on clause' 
SELECT `c2`.`language`,
    CONCAT_WS(':', `c2`.`myId`, `c2`.`customAlias`) AS `myId`,
    CONCAT_WS(':', ca.id, ca.alias) AS `catid`
FROM `#__mytables` AS `c`
    INNER JOIN `#__associations` AS `a` ON a.id = c.id AND a.context='com_mytables.item'
    INNER JOIN `#__associations` AS `a2` ON a.key = a2.key
    INNER JOIN `#__mytables` AS `c2` ON a2.id = c2.`myId`
    INNER JOIN `#__categories` AS `ca` ON `c2`.`catid` = ca.id AND ca.extension = 'com_mytables'
WHERE c.myId = 1
avatar Eighke Eighke - open - 11 Feb 2015
avatar joomla-cms-bot joomla-cms-bot - change - 11 Feb 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 11 Feb 2015
Easy No Yes
avatar zero-24 zero-24 - change - 12 Feb 2015
Category Libraries
avatar infograf768
infograf768 - comment - 17 Feb 2015

@test
OK with me. One more tester

avatar bembelimen bembelimen - test_item - 17 Feb 2015 - Tested unsuccessfully
avatar bembelimen
bembelimen - comment - 17 Feb 2015

Please quote the variable name or make sure, that it's not attackable.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6052.
avatar Eighke
Eighke - comment - 17 Feb 2015

Right, my bad. Updated.

avatar bembelimen
bembelimen - comment - 17 Feb 2015

@test ok for me


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6052.
avatar zero-24 zero-24 - change - 17 Feb 2015
Status Pending Ready to Commit
avatar bembelimen bembelimen - test_item - 17 Feb 2015 - Tested successfully
avatar zero-24 zero-24 - alter_testresult - 17 Feb 2015 - infograf768: Tested successfully
avatar zero-24
zero-24 - comment - 17 Feb 2015

Thanks for testing and coding moving to RTC now!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6052.
avatar brianteeman brianteeman - change - 17 Feb 2015
Labels Added: ?
avatar zero-24 zero-24 - close - 25 Feb 2015
avatar wilsonge wilsonge - change - 25 Feb 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-02-25 00:56:14
avatar wilsonge wilsonge - close - 25 Feb 2015
avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment