# Exported HTML - Some tags not being resolved

**URL:** <https://community.mp3tag.de/t/exported-html-some-tags-not-being-resolved/63007>\
**Category:** Support\
**Created:** [December 5, 2023, 4:19am UTC](https://community.mp3tag.de/t/exported-html-some-tags-not-being-resolved/63007 "2023-12-05T04:19:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mls](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mls/32/4841_2.png) [@mls](https://community.mp3tag.de/u/mls)\
**Post date:** [December 5, 2023, 4:19am UTC](https://community.mp3tag.de/t/exported-html-some-tags-not-being-resolved/63007/1 "2023-12-05T04:19:53Z")

</div>

Hello, I have an export .mte that generates some fairly complex HTML to create a library report by album. Many of the tags such as %album%, %albumartist%, %title%, %\_max\_counter%, etc are resolved correctly in the HTML file. However, some other tags such as %\_datetime%, %total\_files%, %\_workingdir%, %\_total\_size% are not being resolved.

I have reviewed the documentation, but if an explanation exists, I have not found it. Am I missing something?

.mte file  
[v7tAlbum.mte](https://community.mp3tag.de/uploads/short-url/7dY39nRNbMVLTm5Pf7HdJLWFle6.mte) (10.1 KB)

```auto
Heading portion of HTML file
	<div class="head1">
		<div class="h11">&nbsp;</div>
		<div class="h12"> 
Music Library by Album - Contents of %_workingdir%: $fmtNum(19544) Albums | %_total_size% | $fmtNum(%_total_files%) Track$ifgreater(19544,1,s,) | $get(TText)
	 	</div>
		<div class="h13"><a href="#" onclick="w3.toggleShow(''.cmdline'');" title="Click here to show command line">Cmd</a></div>
		
</div><!-- end div head1 -->

```

Partial first page of rendered HTML file

 ![image](https://community.mp3tag.de/uploads/default/original/2X/8/8cd22c33dfccd929edf82c65a85e8097cae47c2f.png)

I assume that I am missing something obvious and the explanation for this behavior will be user error. Should that not be the case, I will be happy to provide more comprehensive documentation.

Thank you for your assistance,  
Mike

---

<div class="post-metadata">

**Author:** ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)\
**Post date:** [December 5, 2023, 7:36am UTC](https://community.mp3tag.de/t/exported-html-some-tags-not-being-resolved/63007/2 "2023-12-05T07:36:33Z")

</div>

Did you made this export script by your self?

Has it ever worked with this mix of local Javascript, external libraries like `http://code.jquery.com/jquery-1.11.0.min.js`, HTML stylesheets and the mp3tag variables?

---

<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:** [December 5, 2023, 7:50am UTC](https://community.mp3tag.de/t/exported-html-some-tags-not-being-resolved/63007/3 "2023-12-05T07:50:13Z")

</div>

AFAIC see, the problems arise in the header and footer defnition.  
If you enter the statement itself, e.g.  
`Index generated on $left(%_datetime%,$strchr(%_datetime%, )) at $mid(%_datetime%,$strchr(%_datetime%, ),16) `  
then all the vriables and functions get resolved.  
The header apepars twice in the output.  
%\_max\_counter% gets also resolved but most of the other statements in the header and footer section are interpreted as literals - you also see $fmtnum() and `$ifgreater(%_max_counter%,1,s,)`.  
So it is not a problem of the variables but that for some reason the header and footer parts are igrnored.

Edit: as the code has a number of `'` it would be worthwhile to check whether they really appear in pairs or whether a stray single one lurks somewhere in the code.

---

<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:** [December 5, 2023, 10:56am UTC](https://community.mp3tag.de/t/exported-html-some-tags-not-being-resolved/63007/4 "2023-12-05T10:56:19Z")

</div>

I checked the number of apostrohes with a simple search and replace and got an even number, not an odd one.

---

<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:** [December 5, 2023, 1:09pm UTC](https://community.mp3tag.de/t/exported-html-some-tags-not-being-resolved/63007/5 "2023-12-05T13:09:52Z")

</div>

I just took the header part of the post and put it into a new export script and let it export a text file:

```auto
$filename(New export file.txt,utf-8)
Heading portion of HTML file
	<div class="head1">
		<div class="h11">&nbsp;</div>
		<div class="h12"> 
Music Library by Album - Contents of %_workingdir%: $fmtNum(19544) Albums | %_total_size% | $fmtNum(%_total_files%) Track$ifgreater(19544,1,s,) | $get(TText)
	 	</div>
		<div class="h13"><a href="#" onclick="w3.toggleShow(''.cmdline'');" title="Click here to show command line">Cmd</a></div>
		
</div><!-- end div head1 -->

```

And this is what the output looks like:

```auto

Heading portion of HTML file
	<div class="head1">
		<div class="h11">&nbsp;</div>
		<div class="h12"> 
Music Library by Album - Contents of Music: 19.544 Albums | 17,91 MB | 1 Tracks | 
	 	</div>
		<div class="h13"><a href="#" onclick="w3.toggleShow('.cmdline');" title="Click here to show command line">Cmd</a></div>
		
</div><!-- end div head1 -->
Which means: 
the variables and functions are resolved in this code part.
So I assume that the total script has somewhere a section that makes the header string to be treated as literal.
I do not see it as my task in this forum to do the debugging in the total script.

```

Edit:  
I just deleted most of the version comments from the mte file and now the output looks like this (probably due to the unavailable css):  
 ![grafik](https://community.mp3tag.de/uploads/default/original/2X/9/96c28d1a36ff42c4889ba130a3bf9dcfa1e1c91d.png)

But the more important part: the header now shows resolved functions and variables.  
So, please check your code.

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [January 4, 2024, 1:10pm UTC](https://community.mp3tag.de/t/exported-html-some-tags-not-being-resolved/63007/6 "2024-01-04T13:10:12Z")

</div>

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