Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
Marcher Technologies Posted May 21, 2012 Posted May 21, 2012 this is just a friendly asking. IPB freaks out, by any array key with : in it. Now how common is that? depends on whether you work heavily with xml files. As it is, im having to strip the array keys to be able to loop properly, and retreiving an array of attributes from a source tag( think itunes:creator) makes the xml kernel explode. need better handling of this in this library quite specifically when somebodies got some free time to re-arrange a kernel with.
Marcher Technologies Posted May 21, 2012 Author Posted May 21, 2012 quick example for anyone going "huh"? <media:thumbnail url='someurl' type='somemimetype' /> The xml library chokes on this, throws errors up trying to read the attributes.
Michael Posted May 21, 2012 Posted May 21, 2012 As long as the XML validates, then wouldn't this be a bug?
Marcher Technologies Posted May 21, 2012 Author Posted May 21, 2012 As long as the XML validates, then wouldn't this be a bug? Maybe? it goes further than XML's TBH... or the specific item i am messing with. example. $array = array(); $array['my:key'] = array('A', 'B', 'C'); ipsRegistry->getClass('output')->getTemplate('somegroup')->someTemplate($array); try to loop through that array with my:key.
Marcher Technologies Posted May 21, 2012 Author Posted May 21, 2012 the issue im having specifically as a note is reading this tag... this is raw-dump, but you get the gist... I'm not seeing any capability for reading this structure in the xml kernel: ) ) [1] => Array ( [@attributes] => Array ( [width] => 144 [height] => 81 [url] => ) ) ) [media:thumbnail] => Array ( [0] => Array ( [@attributes] => Array ( [width] => 66 [height] => 49 [url] => this is within the "record" level.... seeing nothing that will iterate through that in the xml kernel.
Michael Posted May 21, 2012 Posted May 21, 2012 You didn't answer my question above, if this is valid XML then why start a feedback topic about it instead of reporting it as a bug? If it's valid XML, and the XML class in IP.Board can't handle it, that's a bug.
Marcher Technologies Posted May 21, 2012 Author Posted May 21, 2012 You didn't answer my question above, if this is valid XML then why start a feedback topic about it instead of reporting it as a bug? If it's valid XML, and the XML class in IP.Board can't handle it, that's a bug. umm, sure, but I'm not certain it was ever designed to read that far into the xml like that in the first place? the more legitimate bug would be the array keys itself in the templates in post 4... but sure, I'll report what may be a feature request.
bfarber Posted May 21, 2012 Posted May 21, 2012 Is the issue reading the XML, or handling it in the template. Or are you not finding a way to read nested into the arrays the XML library creates? If that's the case, you have to pass parent element name to the fetchElements() method to drill down properly.
Marcher Technologies Posted May 21, 2012 Author Posted May 21, 2012 Is the issue reading the XML, or handling it in the template. Or are you not finding a way to read nested into the arrays the XML library creates? If that's the case, you have to pass parent element name to the fetchElements() method to drill down properly. reading the xml ill likely sort, I'm already drilling down into channels and item here frankly... the feedback topic was made as a result of specifically the : in templates... stripping them creates a difference between the raw xml they would get if is not ATOM or RSS, and the data being handed when it is, leaving them causes issues when looping using those keys.
Marcher Technologies Posted May 21, 2012 Author Posted May 21, 2012 Is the issue reading the XML, or handling it in the template. Or are you not finding a way to read nested into the arrays the XML library creates? If that's the case, you have to pass parent element name to the fetchElements() method to drill down properly. apparently fetchElements IS an issue.. try to fetchElements on a tag with a : ... it fails, fetchElementsFromRecord, fetchItem, or fetchAttributesAsArray return no results, it *silently* fails.... NOW I'll report a bug on it... cause that is one. :D
Recommended Posts
Archived
This topic is now archived and is closed to further replies.