Mailing List Archive

Media URI encoding issue
Hi,

Due to an older bug in Bricolage, we have a large amount of media that
are not URI-encoded in our database. They can be repaired one at a time
via checkout->save->checkin in the interface, but that's far too
time-consuming for this many (3,400+) assets.

I've tried using SOAP, but I keep running into roadblocks (see
http://bricolage.lighthouseapp.com/projects/29601/tickets/184-bric_soap-media-update-sets-the-current-time-as-the-medias-expire-date#ticket-184-1).

Is it possible to simply write some SQL and update the media_uri table
in the database without affecting anything negatively? I'm thinking
something like this: "UPDATE media_uri SET uri = replace(uri, ' ',
'%20');" to fix white spaces. I'll have to perform a similar operation
for other characters that should be encoded, too.

Any other ideas on repairing this issue?

Thanks,
Nick

--
Nick Legg
Information Technology Services
Web Developer
Denison University
740-587-6537
leggn@denison.edu
Re: Media URI encoding issue [ In reply to ]
On Jun 25, 2010, at 8:58 AM, Nick Legg wrote:

> Is it possible to simply write some SQL and update the media_uri table in the database without affecting anything negatively? I'm thinking something like this: "UPDATE media_uri SET uri = replace(uri, ' ', '%20');" to fix white spaces. I'll have to perform a similar operation for other characters that should be encoded, too.
>
> Any other ideas on repairing this issue?

No, that seems like a good one. You might also have to correct it in media_instance.uri and story.primary_uri.

Best,

David