- Posts: 2
COMMUNITY FORUM
K2 Extrafields alias 'y' char
- asQue
-
Topic Author
- Offline
- New Member
Less
More
10 years 1 month ago #142103
by asQue
K2 Extrafields alias 'y' char was created by asQue
Hi there! Yday I found some ugly bug that one day can dissapoint the owner of the site=)
To repeat the bug:
1. i have joomla 2.5 and k2(version 2.6.7, i suppose)
2. i try to create an extra field with alias "type"
3. when i try to update this extrafield and open it from admin panel, i see in the alias field "tYpe" instead of "type".
4. if i do not recognize that, i modify some fields and press "Save" and alias will change.
The problem begin, when in template file there is a string:
echo $this->item->extrafields->type->value;
this will echo nothing because alias is not "type", but "tYpe".
This is annoying=\
The problem goes from file:
/administrator/components/com_k2/views/extrafield/view.html.php
there you replace bad alias symbols with latin one.
there is a chunk of $searches array:
'Ӷ', 'y', 'Д'
and a chunk of $replacements array:
'G', 'Y', 'D'
but 'y' char stands for standart latin 'y' (ascii code 121 if everything is ok)
I can see 3 solutions:
1. remove this pair of replacements from arrays.
2. replace 'y' with 'y', not 'Y'
3. probably it is mistake and on the place of 'y' should be another simbol like 'Y'
Please give me an answer=)
P.S. members of community, let's collect some data on this issue! If you want to help - please check it on your sites. Just create new extra field containing 'y' in its alias and then save it. Give us a results on what you get when you open extrafield again. Provide us with version of joomla/k2 you own if possible!
Thanks!
To repeat the bug:
1. i have joomla 2.5 and k2(version 2.6.7, i suppose)
2. i try to create an extra field with alias "type"
3. when i try to update this extrafield and open it from admin panel, i see in the alias field "tYpe" instead of "type".
4. if i do not recognize that, i modify some fields and press "Save" and alias will change.
The problem begin, when in template file there is a string:
echo $this->item->extrafields->type->value;
this will echo nothing because alias is not "type", but "tYpe".
This is annoying=\
The problem goes from file:
/administrator/components/com_k2/views/extrafield/view.html.php
there you replace bad alias symbols with latin one.
there is a chunk of $searches array:
'Ӷ', 'y', 'Д'
and a chunk of $replacements array:
'G', 'Y', 'D'
but 'y' char stands for standart latin 'y' (ascii code 121 if everything is ok)
I can see 3 solutions:
1. remove this pair of replacements from arrays.
2. replace 'y' with 'y', not 'Y'
3. probably it is mistake and on the place of 'y' should be another simbol like 'Y'
Please give me an answer=)
P.S. members of community, let's collect some data on this issue! If you want to help - please check it on your sites. Just create new extra field containing 'y' in its alias and then save it. Give us a results on what you get when you open extrafield again. Provide us with version of joomla/k2 you own if possible!
Thanks!
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 1 month ago #142105
by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Extrafields alias 'y' char
Hellom
This has been resolved github.com/joomlaworks/k2/commit/1ab72c4cce3f56d013566248ecc3bb4d7105a110
Also K2 2.6.7 is outdated. Please update to its latest version.
This has been resolved github.com/joomlaworks/k2/commit/1ab72c4cce3f56d013566248ecc3bb4d7105a110
Also K2 2.6.7 is outdated. Please update to its latest version.
Please Log in or Create an account to join the conversation.
- asQue
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 2
10 years 1 month ago - 10 years 1 month ago #142106
by asQue
Replied by asQue on topic K2 Extrafields alias 'y' char
TY for answering. I have downloaded the latest version now from here getk2.org/
Issue is still there (in this file: K2_v2.6.9.zip\administrator\components\com_k2\views\extrafield\view.html.php)
P.S. i have updated the site too, issue is still there
Issue is still there (in this file: K2_v2.6.9.zip\administrator\components\com_k2\views\extrafield\view.html.php)
P.S. i have updated the site too, issue is still there
Last edit: 10 years 1 month ago by asQue.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 1 month ago #142142
by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Extrafields alias 'y' char
Then please apply the patch I sent you.
Please Log in or Create an account to join the conversation.