greengerong / Prerender_asp_mvc

Prerende client for asp.net mvc
http://prerender.io/
86 stars 39 forks source link

Prerender_asp_mvc stopped working correctly on my website #40

Closed shimozurdo closed 5 years ago

shimozurdo commented 5 years ago

It had been functioning properly about 6 months. But suddenly we noticed that it did not render correctly the meta tags of the page. capture

The only change we made was to redirect to https and our web config is like this.

<configuration>
  <configSections>
    <section name="prerender" type="Prerender.io.PrerenderConfigSection, Prerender.io, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
  </configSections>
  <prerender token="[Token]">
  </prerender>
  <appSettings>
    ...
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.5.2" />
    <httpRuntime targetFramework="4.5.2" maxUrlLength="2048" />
    <httpModules>
      ...
      <add name="Prerender" type="Prerender.io.PrerenderModule, Prerender.io, Version=1.0.0.2, Culture=neutral, PublicKeyToken=null" />
    </httpModules>
  </system.web>
  <runtime>
    ...
  </runtime>
  <system.webServer>
    <httpProtocol>
      ...
    </httpProtocol>
    <staticContent>
      ...
    </staticContent>
    <rewrite>
      <rules>
        <rule name="httpsredirect" stopProcessing="true">
          <match url="(.*)" />
          <conditions>
            <add input="{HTTPS}" pattern="off" ignoreCase="true" />
          </conditions>
          <action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />
        </rule>
      </rules>
    </rewrite>
    <security>
      <requestFiltering allowDoubleEscaping="true" />
    </security>
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      ...
    </modules>
  </system.webServer>
  <system.codedom>
    ..
  </system.codedom>
</configuration>

We went back to update the library from nuget package, we even downloaded the project and compiled it and used the dll and it has not worked again.

Note: the urls of the site do not use # or !# They appear like these https://github.com/vinaygopinath/ngMeta for example.

using this in angularjs router $locationProvider.html5Mode(true); and <base href="/" /> in th html

I reiterate, the project before worked properly, which means that it was configured correctly, as indicated in the tutorial, but now it no longer render the code js in the searches.

Any suggestions? Thanks in advance.

thoop commented 5 years ago

I'm seeing some javascript errors on your site that prevent it from loading at all:

image

It looks like that is what is being served back to Facebook. Can you make sure your website is loading properly then recache it to see if it saves the correct content?

shimozurdo commented 5 years ago

Ok, we did some changes in the code, because of the page had errors, now the issues was fixed. Now i can see the prerender is caching pages again.

capture

However only this link "https://solomedicos.org.mx/" shows the complete data in facebook debugger, but not this "https://solomedicos.org.mx/directorio/especialista/4568305-rodolfo-salazar-villa" for example

both has meta tags

capture2 capture3

It might take a while to show the full information but I'm not sure.