error/bug? writing $TagData['url_user'] in demo.simple.write

The place for "I can't figure out how to..." questions.
Post Reply
samu
User
Posts: 6
Joined: Tue Aug 02, 2005 1:03 pm

error/bug? writing $TagData['url_user'] in demo.simple.write

Post by samu » Wed Aug 03, 2005 8:38 am

I get error messages when trying to write url_user with demo.simple.write.php. I can add other tags like ['composer'] etc. and get them written but if I try 'url_user' I get following error messages:

----------------------------------
Failed to write tags!
DeleteAPEtag() failed with message(s):

WriteID3v2() failed with message(s):
Invalid URL in WXXX (

samu
User
Posts: 6
Joined: Tue Aug 02, 2005 1:03 pm

Post by samu » Thu Aug 04, 2005 9:52 am

Same result also in Linux-environment. Can't write any URL-data, ID3v2-data starting with W-character - I used also well formed URL, like 'http://www.google.com':

$ID3v2ShortFrameNameLookup[3]['commercial'] = 'WCOM';
$ID3v2ShortFrameNameLookup[3]['copyright_information'] = 'WCOP';
$ID3v2ShortFrameNameLookup[3]['url_file'] = 'WOAF';
$ID3v2ShortFrameNameLookup[3]['url_artist'] = 'WOAR';
$ID3v2ShortFrameNameLookup[3]['url_source'] = 'WOAS';
$ID3v2ShortFrameNameLookup[3]['url_station'] = 'WORS';
$ID3v2ShortFrameNameLookup[3]['payment'] = 'WPAY';
$ID3v2ShortFrameNameLookup[3]['url_publisher'] = 'WPUB';
$ID3v2ShortFrameNameLookup[3]['url_user'] = 'WXXX';

Tags above can't be written. If trying getting same kind of error message.

samu
User
Posts: 6
Joined: Tue Aug 02, 2005 1:03 pm

Post by samu » Thu Aug 04, 2005 10:24 am

Error seems to come from write.id3v2.php in line 343-344:
} elseif (!isset($source_data_array['data']) || !$this->IsValidURL($source_data_array['data'], false, false)) {
$this->errors[] = 'Invalid URL in '.$frame_name.' ('.$source_data_array['data'].')';
echo "error comes from here";
}

And if ignoring these lines, to url_user will be written characters '

samu
User
Posts: 6
Joined: Tue Aug 02, 2005 1:03 pm

Post by samu » Thu Aug 04, 2005 11:08 am

In utf8 the strings look like:

error comes from here
source_data_array[data]:

samu
User
Posts: 6
Joined: Tue Aug 02, 2005 1:03 pm

Post by samu » Thu Aug 04, 2005 1:21 pm

I didn't find out why the URL-tags become messy but I just solved problem with following kludge:

added in write.id3v2.php file after case 'WXXX' (after line number 336) following lines:

$string=addslashes($source_data_array['data']);
$string=str_replace("

milius.net
User
Posts: 16
Joined: Thu Feb 02, 2006 3:19 pm

Post by milius.net » Fri Feb 03, 2006 7:13 pm

I am having the same problem right now with unix environment & version 1.7.5-200512251515' - nice how you found out all about it samu and that you shared your knowledge and the solution!

I would like to know (from someone of the official getid3-team?) if the solution from samu is 100% ok or does it damage the audio file?

thanks for your answer

milius.net
User
Posts: 16
Joined: Thu Feb 02, 2006 3:19 pm

Post by milius.net » Sat Feb 04, 2006 12:12 pm

it's an error around "unicode"...

in my case it's

Post Reply