# \[X\] Adding a field loses empty fields

**URL:** https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510
**Category:** No Bugs
**Created:** [September 16, 2011, 7:21pm UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510 "2011-09-16T19:21:59Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [September 16, 2011, 7:21pm UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/1 "2011-09-16T19:21:59Z")

</div>

e.g. on  
 ![](http://img90.imageshack.us/img90/1346/regiony.png)  
, add a field - Mp3tag loses the three empty fields.

EDIT: Adding a fields is not necessary to lose the empty fields. Simply loading and saving is sufficient.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [September 19, 2011, 4:18pm UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/2 "2011-09-19T16:18:30Z")

</div>

> [@chrisjj](#):
>
> e.g. on add a field - Mp3tag loses the three empty fields.

I am not quite sure if this is a fault.  
Wouldn't one expect that if one rewrites the tags (by adding a new field) only the filled ones get copied?  
So if there was nothing in these fields, then there isn't anything to be written.  
Where have I gone wrong?

PS: How did you get the empty fileds in the first place?

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [September 19, 2011, 4:28pm UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/3 "2011-09-19T16:28:16Z")

</div>

> [@ohrenkino](#):
>
> Wouldn't one expect that if one rewrites the tags (by adding a new field) only the filled ones get copied?

I wouldn't. I would expect Mp3tag to make only the change that was requested.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [September 19, 2011, 4:47pm UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/4 "2011-09-19T16:47:58Z")

</div>

> [@chrisjj](#):
>
> I wouldn't. I would expect Mp3tag to make only the change that was requested.

I would consider it bad style by a program if it simply reduced a string length to zero but not get rid of the field altogether. Apparently, there are different expectations.  
So, how did you get the empty fields in the first place? Did you use MP3tag for that?

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [September 19, 2011, 5:09pm UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/5 "2011-09-19T17:09:22Z")

</div>

> [@ohrenkino](#):
>
> I would consider it bad style by a program if it simply reduced a string length to zero but not get rid of the field altogether.

This operation does not ask the program to reduce the string length to zero. It does not ask the program to change these fields at all.

> [@ohrenkino](#):
>
> So, how did you get the empty fields in the first place?

The came in the sample file, installed by Windows

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [September 20, 2011, 8:29am UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/6 "2011-09-20T08:29:36Z")

</div>

I think I have read somewhere in this forum that Mp3tag does not support empty tag fields. But it does not delete them, it only does not display them. And there are other programs which still display them after Mp3tag has seemingly deteted them.  
But I'm not sure about that and can't find the place where I read it.

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [September 20, 2011, 8:43am UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/7 "2011-09-20T08:43:36Z")

</div>

> [@pone](#):
>
> I think I have read somewhere in this forum that Mp3tag does not support empty tag fields. But it does not delete them, it only does not display them.

Thanks, but the screenshot in the root post shows otherwise - Mp3tag does display these empty fields.

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [September 20, 2011, 8:57am UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/8 "2011-09-20T08:57:43Z")

</div>

> [@chrisjj](#):
>
> Thanks, but the screenshot in the root posts shows otherwise - Mp3tag does display these empty fields.

I know, I see. But it looses them after saving, right?  
I don't know exactly. I think in the post was talking about, someone was wondering why the fields of which he thought he had deleted them, still showed up in another program. And the answer was, because he had not deleted them with the action "remove fields" but only made them empty and saved them.

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [September 20, 2011, 9:06am UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/9 "2011-09-20T09:06:00Z")

</div>

Here it is:  
[Conditionally deleting id3v2 tags with actions?](https://community.mp3tag.de/t/12119/5)

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [September 20, 2011, 10:05am UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/10 "2011-09-20T10:05:18Z")

</div>

> [@pone](#):
>
> I know, I see. But it looses them after saving, right?

> [@pone](#):
>
> I don't know exactly. I think in the post was talking about, someone was wondering why the fields of which he thought he had deleted them, still showed up in another program. And the answer was, because he had not deleted them with the action "remove fields" but only made them empty and saved them.

I think that issue is related but different, perhaps because it is on MP3 not WMA as here.

Here, AFACT the fields **are** lost from the file upon Mp3tag save.

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [October 8, 2011, 2:22pm UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/11 "2011-10-08T14:22:16Z")

</div>

Florian, is this going to be fixed?

---

<div class="post-metadata">

### Author: ![ptrk.mj](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ptrk.mj/32/300_2.png) [@ptrk.mj](https://community.mp3tag.de/u/ptrk.mj)
#### Post date: [October 11, 2011, 1:39pm UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/12 "2011-10-11T13:39:52Z")

</div>

Are we talking about ID3 tags?

[ID3v2 frame overview](http://www.id3.org/id3v2.3.0#head-1a37d4a15deafc294208ccfde950f77e47000bca)  
"A frame must be at least 1 byte big, excluding the header."

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [October 11, 2011, 1:52pm UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/13 "2011-10-11T13:52:33Z")

</div>

> [@ptrk.mj](#):
>
> Are we talking about ID3 tags?

No. As the original reports shows, we're talking about WMA.

---

<div class="post-metadata">

### Author: ![ptrk.mj](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ptrk.mj/32/300_2.png) [@ptrk.mj](https://community.mp3tag.de/u/ptrk.mj)
#### Post date: [October 19, 2011, 7:53pm UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/14 "2011-10-19T19:53:29Z")

</div>

At the moment removing empty fields is needed for conditional removal.

Format value:  
FIELD  
$if(something,%field%,)

If something is true field is retained, if not it is emptied=removed.

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [October 19, 2011, 8:06pm UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/15 "2011-10-19T20:06:09Z")

</div>

> [@ptrk.mj](#):
>
> At the moment removing empty fields is needed for conditional removal.

That's no excuse for removal when another field is _ **added** _, as reported here.

---

<div class="post-metadata">

### Author: ![ptrk.mj](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ptrk.mj/32/300_2.png) [@ptrk.mj](https://community.mp3tag.de/u/ptrk.mj)
#### Post date: [October 19, 2011, 8:15pm UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/16 "2011-10-19T20:15:00Z")

</div>

> [@chrisjj](#):
>
> That's no excuse for removal when another field is _ **added** _, as reported here.

Yeah, but I was just suggesting that it might be something difficult to change due to the above convention.

---

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [October 19, 2011, 8:24pm UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/17 "2011-10-19T20:24:23Z")

</div>

OK, but I don't see how that would be so. There must be separate code for adding and Format Value..

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [December 28, 2018, 2:30pm UTC](https://community.mp3tag.de/t/x-adding-a-field-loses-empty-fields/12510/18 "2018-12-28T14:30:37Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
