Blogger's MIME Type error is breaking product prices. Here's what changed

If you're using Collective or VOCO template and getting a MIME Type error when trying to save a post, here's how to fix it

wide image

Recently, Blogger started validating enclosure URLs more strictly. It now only accepts direct media file URLs, such as .mp3 or .mp4 files. If you enter a regular webpage URL that Blogger doesn't recognize, like a product page, Blogger will trigger the "invalid MIME type" error and prevent the post from being saved.

Unfortunately, this change affects the pricing system used in the Collective and VOCO templates. The good news? Your existing product listings are probably still fine. You'll only need to make a small adjustment going forward.

Let's walk through what changed and how to fix it (p.s. click one of the solution below).

Solution for Collective template

Step 1: Find This Code 

Search for: 

<div data-sticky_parent='' expr:class='&quot;clearfix post-wrapper post-&quot; + data:post.id'>

Replace it with:

<div data-sticky_parent='' expr:class='&quot;clearfix post-wrapper post-&quot; + data:post.id' expr:data-title-link='data:post.link'>

Step 2: Add the Script

Scroll all the way down to the bottom of your theme HTML and paste the following script just before the closing </body> tag:

<script>
      //<![CDATA[
    
      (function() {
        function getStoreName(url) {
          try {
            var hostname = new URL(url).hostname.replace(/^www\./, '');
            var parts = hostname.split('.');
            var name = parts.length >= 2 ? parts[parts.length - 2] : parts[0];
            return name.charAt(0).toUpperCase() + name.slice(1);
          } catch (e) {
            return 'Store';
          }
        }
    
        function getCleanURL(url) {
          try {
            var u = new URL(url);
            u.searchParams.delete('item_price');
            u.searchParams.delete('item_currency');
            return u.searchParams.toString() === ''
              ? u.origin + u.pathname
              : u.toString();
          } catch (e) {
            return url;
          }
        }
    
        function getPriceData(url) {
          try {
            var u = new URL(url);
            var price = u.searchParams.get('item_price');
            var currency = u.searchParams.get('item_currency');
            if (!price) return null;
            return { price: price, currency: currency || '' };
          } catch (e) {
            return null;
          }
        }
    
        var body = document.body;
    
        // --- SINGLE POST ---
        if (body.classList.contains('post-view')) {
          var metaInner = document.querySelector('.post-meta-inner');
          if (!metaInner) return;
    
          var summaryEl = metaInner.querySelector('.post-summary');
          var postWrapper = document.querySelector('.post-wrapper');
          var titleLinkURL = postWrapper ? postWrapper.getAttribute('data-title-link') : null;
          if (!titleLinkURL) return;
    
          var data = getPriceData(titleLinkURL);
          if (!data || !summaryEl) return;
    
          var cleanURL = getCleanURL(titleLinkURL);
          var storeName = getStoreName(cleanURL);
          var formatted = data.currency + data.price;
    
          var priceEl = document.createElement('p');
          priceEl.className = 'price label';
          priceEl.innerHTML = '<strong>' + formatted + '</strong>';
          metaInner.insertBefore(priceEl, summaryEl);
    
          var buyWrapper = document.createElement('div');
          buyWrapper.className = 'label buybutton';
          buyWrapper.innerHTML =
            '<a class="button buynow" href="' + cleanURL + '" target="_blank">' +
              '<span>' +
                '<i class="source-label">Buy on </i>' +
                '<i class="source-store">' + storeName + '</i>' +
              '</span>' +
            '</a>';
          summaryEl.parentNode.insertBefore(buyWrapper, summaryEl.nextSibling);
        }
    
        // --- MULTIPLE ITEMS ---
        if (body.classList.contains('homepage-view')) {
          var postWrappers = document.querySelectorAll('.post-outer .post .post-wrapper');
          postWrappers.forEach(function(wrapper) {
            var titleLinkURL = wrapper.getAttribute('data-title-link');
            if (!titleLinkURL) return;
    
            var data = getPriceData(titleLinkURL);
            if (!data) return;
    
            var titleEl = wrapper.querySelector('.post-title.entry-title');
            if (!titleEl) return;
    
            var formatted = data.currency + data.price;
            var priceSpan = document.createElement('span');
            priceSpan.className = 'price';
            priceSpan.textContent = formatted;
            titleEl.parentNode.insertBefore(priceSpan, titleEl.nextSibling);
          });
        }
    
      })();
    
      //]]>
    </script>

Hit save. That's the template side sorted.

Solution for VOCO template

Step 1: Find This Code 

Search for: 

<div expr:class='&quot;clearfix post-wrapper not-hero post-&quot; + data:post.id'>

Replace it with:

<div expr:class='&quot;clearfix post-wrapper not-hero post-&quot; + data:post.id' expr:data-title-link='data:post.link'>

Step 2: Add the Script

Scroll all the way down to the bottom of your theme HTML and paste the following script just before the closing </body> tag:

<script>
      //<![CDATA[
    
      (function() {
        function getStoreName(url) {
          try {
            var hostname = new URL(url).hostname.replace(/^www\./, '');
            var parts = hostname.split('.');
            var name = parts.length >= 2 ? parts[parts.length - 2] : parts[0];
            return name.charAt(0).toUpperCase() + name.slice(1);
          } catch (e) {
            return 'Store';
          }
        }
    
        function getCleanURL(url) {
          try {
            var u = new URL(url);
            u.searchParams.delete('item_price');
            u.searchParams.delete('item_currency');
            return u.searchParams.toString() === ''
              ? u.origin + u.pathname
              : u.toString();
          } catch (e) {
            return url;
          }
        }
    
        function getPriceData(url) {
          try {
            var u = new URL(url);
            var price = u.searchParams.get('item_price');
            var currency = u.searchParams.get('item_currency');
            if (!price) return null;
            return { price: price, currency: currency || '' };
          } catch (e) {
            return null;
          }
        }
    
        var body = document.body;
    
        // --- SINGLE POST ---
        if (body.classList.contains('post-view')) {
          var metaInner = document.querySelector('.post-meta-inner');
          if (!metaInner) return;
    
          var summaryEl = metaInner.querySelector('.post-summary');
          var postWrapper = document.querySelector('.post-wrapper');
          var titleLinkURL = postWrapper ? postWrapper.getAttribute('data-title-link') : null;
          if (!titleLinkURL) return;
    
          var data = getPriceData(titleLinkURL);
          if (!data || !summaryEl) return;
    
          var cleanURL = getCleanURL(titleLinkURL);
          var storeName = getStoreName(cleanURL);
          var formatted = data.currency + data.price;
    
          var priceEl = document.createElement('p');
          priceEl.className = 'price label';
          priceEl.innerHTML = '<strong>' + formatted + '</strong>';
          metaInner.insertBefore(priceEl, summaryEl);
    
          var buyWrapper = document.createElement('div');
          buyWrapper.className = 'label buybutton';
          buyWrapper.innerHTML =
            '<a class="button buynow" href="' + cleanURL + '" target="_blank">' +
              '<span>' +
                '<i class="source-label">Buy on </i>' +
                '<i class="source-store">' + storeName + '</i>' +
              '</span>' +
            '</a>';
          summaryEl.parentNode.insertBefore(buyWrapper, summaryEl.nextSibling);
        }
    
        // --- MULTIPLE ITEMS ---
        if (body.classList.contains('homepage-view')) {
          var postWrappers = document.querySelectorAll('.post-outer .post-wrapper');
          postWrappers.forEach(function(wrapper) {
            var titleLinkURL = wrapper.getAttribute('data-title-link');
            if (!titleLinkURL) return;
    
            var data = getPriceData(titleLinkURL);
            if (!data) return;
    
            var titleEl = wrapper.querySelector('.post-title.entry-title');
            if (!titleEl) return;
    
            var formatted = data.currency + data.price;
            var priceSpan = document.createElement('span');
            priceSpan.className = 'label price';
            priceSpan.textContent = formatted;
            titleEl.parentNode.insertBefore(priceSpan, titleEl.nextSibling);
          });
        }
    
      })();
    
      //]]>
    </script>

Step 3: Modify the HTML markup

Locate the following HTML in your template

<div class='post-meta-inner'>
  <div class='post-heading'>
    <b:include data='post' name='postTitle'/>
    <b:loop values='data:post.enclosures' var='enclosure'>
      <p class='price label'><data:enclosure.mimeType/></p>
    </b:loop>
  </div>
  <p class='description'><data:blog.metaDescription/></p>
  <div class='label buybutton'>
    <b:loop values='data:post.enclosures' var='enclosure'>
      <a class='button buynow' expr:href='data:enclosure.url' target='_blank'>
        <span><i class='source-label'>Shop on</i> <i class='source-store'>Our Store</i></span>
        <i class='fas fa-shopping-basket'/>
      </a>
    </b:loop>
  </div>
  <b:include name='postShareButtons'/>
  <b:include data='post' name='postFooter'/>
</div>

replace with this

<div class='post-meta-inner'>
  <b:include data='post' name='postTitle'/>
    <b:loop values='data:post.enclosures' var='enclosure'>
      <p class='price label'><data:enclosure.mimeType/></p>
    </b:loop>
  <p class='description post-summary'><data:blog.metaDescription/></p>
  <div class='label buybutton'>
    <b:loop values='data:post.enclosures' var='enclosure'>
      <a class='button buynow' expr:href='data:enclosure.url' target='_blank'>
        <span><i class='source-label'>Shop on</i> <i class='source-store'>Our Store</i></span>
      </a>
    </b:loop>
  </div>
  <b:include name='postShareButtons'/>
  <b:include data='post' name='postFooter'/>
</div>

Step 4: Finally, modify the CSS

Look for

.post-view .post-outer .price {
  font-size: 1.750em;
  line-height: 140%;
  letter-spacing: 0;
  margin-top: 5%;
}

Replace with this

.post-view .post-outer .price {
  font-size: 1.750em;
  line-height: 140%;
  letter-spacing: 0;
  margin: 5% 0;
}

Hit save. That's the template side sorted. Huff~

Now, how to add pricing to posts

Instead of pasting a URL into the enclosure field, add your product link directly into the post's Title Link field (under Post Settings → Links on the right side of the editor) with two parameters: item_price and item_currency.

Example:

https://www.amazon.com/your-product?item_price=29.99&item_currency=$

A few real-world examples for different currencies:

United States ?item_price=29.99&item_currency=$
Indonesia ?item_price=299.000&item_currency=Rp
European Union ?item_price=27&item_currency=€
Japan ?item_price=12000&item_currency=¥

The template reads those parameters, strips them from the visible buy button link, and displays the price and store name automatically. Your visitors click through to a clean product URL — no extra parameters showing up on the destination page.

Wrapping Up

While that change breaks the old pricing method, the new approach is more flexible and no longer depends on Blogger's enclosure validation system.

The updated versions of both Collective and VOCO are now available. If you purchased your template through Etsy, ThemeForest, or another marketplace, simply download the latest version from your account. If you're a Heybi member, you can grab the updated files anytime by logging into the members area.

If your existing product listings are already displaying correctly, there's no need to rush into updating them. Just use the new method for future posts, or whenever you need to edit an existing product entry.

If you run into any issues after applying the fix, feel free to reach out here and I'll be happy to help.

Found a typo or error in this article? Let us know here and we’ll get it fixed ✅