Closed piel17 closed 9 years ago
Hi! Where exactly is the truncated string? Screenshot welcome.
This is the front product page. I tried to replace the SEPARATOR value in the db query in Product.php but that didn't change anything except the features text is truncating somewhere else. The third image show you that my features values are correctly save.
I've just checked, and nothing in my code is truncating the results… Are you using a custom theme (which one?) that could truncate the results?
piel17, you found solution?
@jdanthinne I found reason why values are truncate.
But i need your help.
You used in module function group_concat and this function have lenght limit in default 1024. With utf-8 formatting it's about 350 chars.
For fix this we need use this: set session group_concat_max_len = 4096
But i don't know where place this in product class. I tried in few places but without success, every time some errors.
PS. I don't have acces to server conf file to change it permamently.
Where is this _groupconcat function in my module? I can't find it.
override\classes\product.php
Line 51 SELECT name, GROUP_CONCAT(value ORDER BY fv.position SEPARATOR ", ") AS value, pf.id_feature
You're right, I was searching in PHP code instead of MySQL :-). I've juste created a branch https://github.com/jdanthinne/advancedfeaturesvalues/tree/issue%235 with a fix that set a bigger length. Can you try that please and tell if it's ok?
Empty field where before was table.
Is it on a live server, or a testing server? Perhaps some servers are limiting the use of SET SESSION… In this case, I need to completely rewrite the SQL query to manually concatenate all the values.
On live server. I wrote also to hosting support for change global limit but i don't know if they will do it.
I've just made a change and set the max length in a separate query. Can you try that? https://github.com/jdanthinne/advancedfeaturesvalues/commit/0d3f7e6ae9af382ddd1720b9c6413a4c8bc80ecd
Now it works perfectly! Good Job :)
Thank you very much :)
Good! Merged changes to the master branch.
Hello, I have installed your module and it works almost perfectly. I met success for growing up the features values length but product page truncate the "$feature.value" string and I don't understand why. (~350 characters) Can you help mee with this ? PS: I'm using Prestashop 1.6.1.0