MPDF error Message: must precede in a table - mpdf

An uncaught Exception was encountered
Type: Mpdf\MpdfException
Message: must precede in a table
Filename: /home/press.altisinfonet.com/public_html/vendor/mpdf/mpdf/src/Mpdf.php
Line Number: 13410
Backtrace:
File: /home/press.altisinfonet.com/public_html/vendor/mpdf/mpdf/src/Mpdf.php
Line: 23545
Function: TableHeaderFooter
File: /home/press.altisinfonet.com/public_html/vendor/mpdf/mpdf/src/Tag/Table.php
Line: 1121
Function: _tableWrite
File: /home/press.altisinfonet.com/public_html/vendor/mpdf/mpdf/src/Tag.php
Line: 246
Function: close
File: /home/press.altisinfonet.com/public_html/vendor/mpdf/mpdf/src/Mpdf.php
Line: 15272
Function: CloseTag
File: /home/press.altisinfonet.com/public_html/app/libraries/Tec_mpdf.php
Line: 68
Function: WriteHTML
File: /home/press.altisinfonet.com/public_html/app/libraries/Sma.php
Line: 302
Function: generate
File: /home/press.altisinfonet.com/public_html/app/controllers/admin/Sales.php
Line: 418
Function: generate_pdf
File: /home/press.altisinfonet.com/public_html/index.php
Line: 303
Function: require_once

In newer mPDF versions (or in a plaintext rendering), the message of this exception is <tfoot> must precede <tbody> in a table.
By HTML 4 specification, the order of table elements has to be <thead> → <tfoot> → <tbody> (this directly contradicts HTML 5 specification where the order is <thead> → <tbody> → <tfoot>).
mPDF adheres to the HTML 4 in this matter.
Put yout <tbody> to the end of the table and the exception will not be thrown.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot

Related

file_get_html() not working for the only webpage

I want to call a simple DOM file
I tested with another links and it works, but with this url it's not working.
My code is:
$bnadatos = file_get_html("http://www.rofex.com.ar/cem/FyO.aspx");
foreach($bnadatos->find('[#id="ctl00_ContentPlaceHolder1_gvFyO"]') as $i){
echo "datos:";
echo $i->innertext;
}
Response is a blank page.
What's wrong?
i solved with
$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
$response = file_get_html("https://www.rofex.com.ar/cem/FyO.aspx", false, stream_context_create($arrContextOptions));
foreach($response->find('[#id="ctl00_gvwDDF"]/tbody/tr[2]/td[2]') as $i){
echo $i->innertext;
}
thank you #maio290 for light my road
This is just a guess, but do you have your error reporting on?
Out of the box, this is not working with the simple-html-dom library:
Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /var/www/html/dom.php on line 83
Warning: file_get_contents(): Failed to enable crypto in /var/www/html/dom.php on line 83
Warning: file_get_contents(http://www.rofex.com.ar/cem/FyO.aspx): failed to open stream: operation failed in /var/www/html/dom.php on line 83
Fatal error: Call to a member function find() on boolean in /var/www/html/test.php on line 11
A fix for this can be found here - with that in place, I still get a blank page, which is due to a wrong answer (301 Moved Permanently) - for this to fix, you need to modify
'follow_location' => false
to
'follow_location' => true
so, now we get the proper site content - you can modify the selector to $html->find('#ctl00_ContentPlaceHolder1_gvFyO'); this will find all element which id=ctl00_ContentPlaceHolder1_gvFyO - see the documentation as reference.

Unexpected token ILLEGAL with dangerouslySetInnerHTML

I am using Symfony2 framework with reactjs for view part. I have a twig variable having html tags.
So I did this - <span {{"dangerouslySetInnerHTML={{__html: ' "~content|raw~" '}}"}}></span>
But this is giving me following error
Error: Parse Error: Line 95: Unexpected token ILLEGAL
at http://localhost/url/abcd
... ouslySetInnerHTML={{__html: '<p></p><p&g ...
When I write something like <span {{"dangerouslySetInnerHTML={{__html: '<div>abcd</div>'}}"}}></span> , Then everything works fine. But when I use a twig variable, this error is thrown.
I would recommend using twig only to output your delimiters and the variable itself:
<span dangerouslySetInnerHTML={{ '{{' }}__html: '{{ content|raw }}' {{ '}}' }}></span>

how to add require_once to a wordpress template file

I am creating a wordpress template file.
I need to require_once() a file path. Where should I put the code?
<?php require_once("phpChart/conf.php");?>
It is giving me errors if I put it in my template file. It doesn't seem to work either in the header.php file.
If I include it in the template file I can a ton of errors. I think it needs to be in the header before the html.
Here are some of the errors:
Notice: Undefined offset: -1 in /xxx/wp-includes/post-template.php on line 262 Call Stack #TimeMemoryFunctionLocation 10.0003283432{main}( ).../index.php:0 20.0004287208require( '/xxx/wp-blog-header.php' ).../index.php:17 30.454546621040require_once( '/xxx/wp-includes/template-loader.php' ).../wp-blog-header.php:16 40.459646824600include( '/xxx/wp-content/themes/gazette-child/email.php' ).../template-loader.php:74 50.537247474312get_header( ).../email.php:18 60.537547477952locate_template( ).../general-template.php:45 70.537547478144load_template( ).../template.php:477 80.537747516408require_once( '/xxx/wp-content/themes/gazette-child/header.php' ).../template.php:501 90.581648215152the_excerpt( ).../header.php:56 100.581648215264get_the_excerpt( ).../post-template.php:336 110.581748215672apply_filters( ).../post-template.php:367 120.581748217056call_user_func_array:{/xxx/wp-includes/plugin.php:213} ( ).../plugin.php:213 130.581748217088wp_trim_excerpt( ).../plugin.php:213 140.581748217248get_the_content( ).../formatting.php:2609 " /> ( ! ) Notice: Undefined offset: -1 in /xxx/wp-includes/post-template.php on line 262 Call Stack #TimeMemoryFunctionLocation 10.0003283432{main}( ).../index.php:0 20.0004287208require( '/xxx/wp-blog-header.php' ).../index.php:17 30.454546621040require_once( '/xxx/wp-includes/template-loader.php' ).../wp-blog-header.php:16 40.459646824600include( '/xxx/wp-content/themes/gazette-child/email.php' ).../template-loader.php:74 50.537247474312get_header( ).../email.php:18 60.537547477952locate_template( ).../general-template.php:45 70.537547478144load_template( ).../template.php:477 80.537747516408require_once( '/xxx/wp-content/themes/gazette-child/header.php' ).../template.php:501 90.585448229760the_excerpt( ).../header.php:68 100.585448229840get_the_excerpt( ).../post-template.php:336 110.585448230048apply_filters( ).../post-template.php:367 120.585448231280call_user_func_array:{/xxx/wp-includes/plugin.php:213} ( ).../plugin.php:213 130.585448231312wp_trim_excerpt( ).../plugin.php:213 140.585448231392get_the_content( ).../formatting.php:2609 - http://xxx/email/">
Use require_once() or include() to include a file. You didn't post what error are you getting?
require('phpChart/conf.php'); in functions.php worked.

Symfony2 :500 Internal error on assetic generated file in dev mode

I use assetic on my Symfony2 project and when i put my project on a new server environement i have the following 500 internal Server Error on the top of the CSS and JS generated files on dev environement. It seems that assetic can't access to the temp directory to generate the file.
[exception] 500 | Internal Server Error | ErrorException
[message] Warning: file_put_contents(): Filename cannot be empty in /Users/jo/Developpement/coV2/Symfony/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php line 92
[1] ErrorException: Warning: file_put_contents(): Filename cannot be empty in /Users/jo/Developpement/coV2/Symfony/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php line 92
at n/a
in /Users/jo/Developpement/coV2/Symfony/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php line 92
at Symfony\Component\HttpKernel\Debug\ErrorHandler->handle('2', 'file_put_contents(): Filename cannot be empty', '/Users/jo/Developpement/coV2/Symfony/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php', '92', array('content' => '/*!
The line 92 of the BaseCompressorFilter class is the last line of this code :
$tempDir = realpath(sys_get_temp_dir());
$input = tempnam($tempDir, 'YUI-IN-');
$output = tempnam($tempDir, 'YUI-OUT-');
file_put_contents($input, $content);
$tempDir is ok, but $input is empty.
Any idea ?

Is there something I can/should do about this VS 2013 exception?

On loading my ASP.NET app/site, I get this err msg: "An exception has been encountered. This may be caused by an extension."
It then says to look in this file:
C:\Users\Clay\AppData\Roaming\Microsoft\VisualStudio\11.0\ActivityLog.xml
...in which I did find three entries that may be related to the problem, yet they are "Greek to me". Due to their voluminosity, I am just including the first one here:
<entry>
<record>676</record>
<time>2013/10/22 13:52:50.109</time>
<type>Error</type>
<source>Editor or Editor Extension</source>
<description>System.ComponentModel.Composition.CompositionException: The composition produced a single composition error, with 2 root causes. The root causes are provided below. Review the CompositionException.Errors property for more detailed information.
1) The export &apos;Microsoft.VisualStudio.Shell.SVsServiceProvider&apos; is not assignable to type &apos;System.Void&apos;.
Resulting in: Cannot set import &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager.VsServiceProvider (ContractName="Microsoft.VisualStudio.Shell.SVsServiceProvider")&apos; on part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager&apos;.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager.VsServiceProvider (ContractName="Microsoft.VisualStudio.Shell.SVsServiceProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager
Resulting in: Cannot get export &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager")&apos; from part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager&apos;.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager
Resulting in: Cannot set import &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager")&apos; on part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider&apos;.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider
Resulting in: Cannot get export &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider")&apos; from part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider&apos;.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider
Resulting in: Cannot set import &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider")&apos; on part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider&apos;.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider
Resulting in: Cannot get export &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider")&apos; from part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider&apos;.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider
2) The export &apos;Microsoft.VisualStudio.Web.Extensions.HTML.TagNameProvider (ContractName="Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider")&apos; is not assignable to type &apos;System.Void&apos;.
Resulting in: Cannot set import &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet.TagNameProvider (ContractName="Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider")&apos; on part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet&apos;.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet.TagNameProvider (ContractName="Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet
Resulting in: Cannot get export &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider")&apos; from part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet&apos;.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet
Resulting in: Cannot set import &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.TagNameProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider")&apos; on part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider&apos;.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.TagNameProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider
Resulting in: Cannot get export &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider")&apos; from part &apos;Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider&apos;.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider
at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart part, ExportDefinition export, Boolean isSharedPart)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()
at System.ComponentModel.Composition.Primitives.Export.get_Value()
at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass4`2.<CreateStronglyTypedLazyOfTM>b__1()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)</description>
</entry>
Decoded error is:
System.ComponentModel.Composition.CompositionException: The composition produced a single composition error, with 2 root causes. The root causes are provided below. Review the CompositionException.Errors property for more detailed information.
1) The export 'Microsoft.VisualStudio.Shell.SVsServiceProvider' is not assignable to type 'System.Void'.
Resulting in: Cannot set import 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager.VsServiceProvider (ContractName="Microsoft.VisualStudio.Shell.SVsServiceProvider")' on part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager.VsServiceProvider (ContractName="Microsoft.VisualStudio.Shell.SVsServiceProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager
Resulting in: Cannot get export 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager")' from part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.RegistryManager
Resulting in: Cannot set import 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager")' on part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider.RegistryManager (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IRegistryManager") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider
Resulting in: Cannot get export 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider")' from part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.BufferFeatureManagerProvider
Resulting in: Cannot set import 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider")' on part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.BufferFeatureManagerProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.IBufferFeatureManagerProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider
Resulting in: Cannot get export 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider")' from part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider
2) The export 'Microsoft.VisualStudio.Web.Extensions.HTML.TagNameProvider (ContractName="Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider")' is not assignable to type 'System.Void'.
Resulting in: Cannot set import 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet.TagNameProvider (ContractName="Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider")' on part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet.TagNameProvider (ContractName="Microsoft.VisualStudio.Web.Extensions.HTML.ITagNameProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet
Resulting in: Cannot get export 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider")' from part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.SPASupportedTagSet
Resulting in: Cannot set import 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.TagNameProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider")' on part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider.TagNameProvider (ContractName="Microsoft.VisualStudio.JavaScript.Web.Extensions.Shared.ISPASupportedTagProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider
Resulting in: Cannot get export 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider")' from part 'Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider'.
Element: Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider (ContractName="Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider") --> Microsoft.VisualStudio.JavaScript.Web.Extensions.Classification.SPARegionTaggerProvider
at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart part, ExportDefinition export, Boolean isSharedPart)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()
at System.ComponentModel.Composition.Primitives.Export.get_Value()
at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
at System.ComponentModel.Composition.ExportServices.c__DisplayClass4`2.b__1()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)
This error is often caused by a corruption in the cached metadata. Why this occurs I do not know, but clearing the cache will usually return Visual Studio to working order:
Visual Studio 2013 is unable to open the Test Window
And then this exception will also occur when you have installed Visual Studio update 1,2,3 or 4 and have other visual studio parts (like the web tools) that were built against an older version. Upgrading them to the latest version usually also helps quite a bit:
https://jessehouwing.net/visual-studio-update-to-webtools-20122-to-resolve/

Resources