spree icon indicating copy to clipboard operation
spree copied to clipboard

shared/_head.html.erb rendered outside of head tag and inside body and body attributes missing

Open richardhartme opened this issue 13 years ago • 3 comments

Running off master with a new sandbox application. Appears that the shared head is being rendered outside the head tag and in the body itself. Another problem is that the class and id attributes of the body tag are being wiped out.

spree_application.html.erb defines:

<!--[if gt IE 9]><!--><html lang="<%= I18n.locale %>"><!--<![endif]-->
  <head data-hook="inside_head">
    <%= render :partial => 'spree/shared/head' %>
  </head>
  <body class="<%= body_class %>" id="<%= @body_id || 'default' %>" data-hook="body">

Body rendered is:

<head data-hook="inside_head">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <!-- Spree Analytics has not been initialized correctly -->
</head>
<body>
<meta charset="utf-8">
<title>Spree Demo Site</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1" name="viewport">

richardhartme avatar May 21 '13 14:05 richardhartme

I believe this is a problem with using Nokogiri with an older version of libxml. Can you please make sure that you're using the absolutely latest stable version of libxml?

On Tue, May 21, 2013 at 10:35 AM, Richard Hart [email protected] wrote:

Running off master with a new sandbox application. Appears that the shared head is being rendered outside the head tag and in the body itself. Another problem is that the class and id attributes of the body tag are being wiped out. spree_application.html.erb defines:

<!--[if gt IE 9]><!--><html lang="<%= I18n.locale %>"><!--<![endif]-->
  <head data-hook="inside_head">
    <%= render :partial => 'spree/shared/head' %>
  </head>
  <body class="<%= body_class %>" id="<%= @body_id || 'default' %>" data-hook="body">

Body rendered is:

<head data-hook="inside_head">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <!-- Spree Analytics has not been initialized correctly -->
</head>
<body>
<meta charset="utf-8">
<title>Spree Demo Site</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1" name="viewport">

Reply to this email directly or view it on GitHub: https://github.com/spree/spree/issues/3059

radar avatar May 21 '13 14:05 radar

That was the problem. Thanks and apologies :frowning:

richardhartme avatar May 21 '13 14:05 richardhartme

I'm having the same issue, but only on the production machine. No problems in development, which runs an older version of libxml.

Dev: MacOS X 10.8.4, libxml 2.7.8 Production: Gentoo/Linux, libxml 2.9.0

A more recent version of libxml is not available for the production machine.

paneidos avatar May 22 '13 14:05 paneidos