mise a jour field link

1 year 6 months ago #66555 by tonnick
Replied by tonnick on topic mise a jour field link
Et si je change le type de champs en texte a la place de weblink, je me retrouve avec ces liens générés du type : a:3:{s:4:"link";s:87:" eur-lex.europa.eu/LexUriServ/LexUriServ...."law";s:4:"hits";i:8 ;}

Cela devient malheureusement très urgent, ce type de champs est en train de bloquer completement la mise a jour de la BDD. Quelle solution conseillez-vous ?!

Please Log in or Create an account to join the conversation.

1 year 6 months ago - 1 year 6 months ago #66557 by ggppdk
Replied by ggppdk on topic mise a jour field link
Hello

you cannot replace it with a different length string

the result with be an invalid PHP serialized string !!
and of course this will be detected and nothing will be displayed in item form or in item view

Try to also set correct new string length e.g like this:
UPDATE `emkd_flexicontent_fields_item_relations`
SET `value` = replace(value,
	's:87:"http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=CONSLEG:2007R1234:20110101:EN:PDF"',
	's:79:"http://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:32013R1308&from=EN"'
)


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

1 year 6 months ago #66564 by tonnick
Replied by tonnick on topic mise a jour field link
oooo understand !!!! maybe stupid question, but why string is shorter of 1 caracter than string itself ? :
echo " eur-lex.europa.eu/LexUriServ/LexUriServ....1234:20110101:EN:PDF " | wc -c
88
echo " eur-lex.europa.eu/legal-content/EN/TXT/P...X:32013R1308&from=EN " | wc -c
80

Then, this means that I cannot do massive update if I need to update only part of URL as :
UPDATE `emkd_flexicontent_fields_item_relations`
SET `value` = replace(value, ' www.asean-gidatabase.org/sites/default ', ' www.asean-gidatabase.org/gidatabase/sites/default ')

The only way would be to script something which would recalculate the final lenght with new url part, right ?!

Please Log in or Create an account to join the conversation.

1 year 6 months ago #66634 by tonnick
Replied by tonnick on topic mise a jour field link
sorry to bohter you, but this is a really important matter. Is there any way to change only part of the URL or due to string lenght, there is no choice to do some script ?

Please Log in or Create an account to join the conversation.

1 year 6 months ago #66639 by micker
Replied by micker on topic mise a jour field link
i didn't think .... sorry

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.