Multilanguage seems not work correctly

Phoca Gallery modules - modules for Phoca Gallery extension
alaureana
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 28 Dec 2015, 18:01

Multilanguage seems not work correctly

Post by alaureana »

Hi,
i'm trying to set up a multilanguage site with Phoca gallery component and Phoca gallery image module.

In backend they work correctly, but i've an issue in frontend: the module seems to get wrong data.

I set those options:

- new module -> language all
- phocagallery category -> language all

- phocagallery item 1 -> language all
- phocagallery item 2 -> language A
- phocagallery item 3 -> language B

When i switch the language, i see always all items.

I'm using joomla 3.4.8, Phocagallery component 4.2.2, Phocagallery Image module 4.2.1.

Ps. I don't know if it's correct, but i tried this and it work:

mod_phocagallery_image/mod_phocagallery_image.php line 699
$query = 'SELECT cc.id, cc.alias as catalias, a.id, a.catid, a.title, a.alias, a.filename, a.description, a.extm, a.exts,a.extl, a.exto, a.extw, a.exth, a.extid,'
. ' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(\':\', cc.id, cc.alias) ELSE cc.id END as catslug, '
. ' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\':\', a.id, a.alias) ELSE a.id END as slug'
. ' FROM #__phocagallery_categories AS cc'
. ' LEFT JOIN #__phocagallery AS a ON a.catid = cc.id'
. ' WHERE a.id in (' . $imageIds . ') AND (cc.language IN ("*", "' . $lang . '") AND (a.language IN ("*", "' . $lang . '"))'
.$imageOrdering;
[red] = pseudocode

Sorry for my bad english and thank you for ur time.
..and happy new year ;)

Andrea
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Multilanguage seems not work correctly

Post by Jan »

Hi, thank you for the info, I will take a look at it.

For now, I just can say, it seems like your correction is OK - the module does not have support for the language so adding it to the sql query shoud be Ok. Of course all possible combinations should be tested but I think, this is the way to fix it.

Added to feature request list.

Thank you, Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Multilanguage seems not work correctly

Post by Jan »

Hi, changed in version 4.3.0

Jan
If you find Phoca extensions useful, please support the project
Post Reply