symphonists / association_field

Association Field for Symphony CMS
http://symphonyextensions.com/extensions/association_field/
Other
8 stars 5 forks source link

Wrong handles: & becomes and-amp #30

Open mprofitlich opened 6 years ago

mprofitlich commented 6 years ago

Associated entry handles with an ampersand turn into and-amp. This happens both in standard English installations and installations in another language (in my case German).

Example Section 1: Text field. Entry: Bread & Butter Section 2: Association to section 1's textfield Data source: Section 2: association XML: bread-and-amp-butter.

Symphony 2.7.7 Association field 2.1.0

nitriques commented 6 years ago

What's the handle for Text field in Section 1 ? Is it ok ?

mprofitlich commented 6 years ago

Yes, it is ok. XML

nitriques commented 6 years ago

@jonmisfud any ideas ? Would it be related to this: https://github.com/symphonists/association_field/blob/master/fields/field.association.php#L385 ?

twiro commented 6 years ago

I just updated an older symphony project and faced exactly the same problem!

I also tested the datasource-output of associated items in other installations to backtrace where this behavior comes from and it looks like it's happening since Symphony 2.6.X, no matter which version of association field is used…

Symphony Version Association Field Version "&" in handle Status
2.5.2 1.0.0.beta x-and-y :white_check_mark:
2.6.2 1.3.3 x-and-amp-y :x:
2.6.3 1.0.0.beta x-and-amp-y :x:
2.6.3 1.0.1 x-and-amp-y :x:
2.6.7 1.0.1 x-and-amp-y :x:
2.7.7 2.1.0 x-and-amp-y :x:

Haven't tested if it affects datasource filtering too, but it can definitively cause troubles in the templates if you use the associated item-handles for further handle-based features/routing/etc.

Will try to do some further investigations as soon as I find the time, but for now I'll just leave this information here.