Search

Hello, Not quite sure where to post it, I guess it's a General question and not so much Troubleshooting.

I like my documents clean, and I always remove anything unnecessary from my website. To get the thing as minimized as possible.

While working my way through the basic tutorials I kept checking the source from my results and there is some

<style>
.tweet .action-buffer-container i, .tweet.opened-tweet .action-buffer-container i, .tweet.opened-tweet.hover .action-buffer-container i  { background-position: -3px -3px !important; } .tweet .action-buffer-container i { background-position: -3px -21px !important; } 
</style>
 <style type="text/css"></style>

http://www.w3.org/TR/REC-html40/present/styles.html w3c document this as follows:

type = content-type [CI] This attribute specifies the style sheet language of the element's contents and overrides the default style sheet language. The style sheet language is specified as a content type (e.g., "text/css"). Authors must supply a value for this attribute; there is no default value for this attribute.

http://www.w3.org/TR/REC-html40/present/styles.html

Ah, let me clearify... Since my original post is so unclear.

It's about the contents of the <style> tag. meaning the .tweet .action-buffer-containter stuff, which it throws in there by default. and the second <style> tag, which is empty so shouldn't be there at all.

I’m not entirely sure (which tutorial are you working through?), but I think it might be getting inserted via javascript through a twitter embed.

The thing is...

I did a clean install. There is nothing, no extensions or anything that I added myself. I spotted it at the first tutorial (Hello World greetings).

What browser you using? And have you got a twitter extension in your browser plugins?

Yes, good suggestion, @moonoo2. A good way to check to see if it’s a browser plugin is to go to http://[your-url.com]/?debug=result and see if it’s being generated in what Symphony is serving up. If it’s not there, then it’s not getting added by Symphony, but by your browser.

Guys, thank you. It was indeed the "Buffer" plug in. I feel stupid now :)

Still there is that empty <style type="text/css"></style> tag, but that might be also my browser then (I use Safari)?

Check your .xsl files.

Safari > there's your problem right there :p kidding!

Heh. I predominantly develop in Safari as well (or the webkit nightly), it usually doesn’t stick anything extra into the DOM (I don’t use many browser extensions, though).

Can't find anything in my xsl files. The tutorial template does the same. It adds the empty style tag.

<?xml version="1.0" encoding="UTF-8"?>
 <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

 <xsl:output method="xml"
    doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
    omit-xml-declaration="yes"
    encoding="UTF-8"
    indent="yes" />

 <xsl:template match="/">
    <html>
        <head>
            <title>Hello World!</title>
        </head>
        <body>
            <h1>Symphony Greets the World</h1>
            <h2>Greetings</h2>
            <ul>
                <xsl:apply-templates select="/data/greetings/entry"/>
            </ul>
        </body>
    </html>
 </xsl:template>

 <xsl:template match="greetings/entry">
    <li><xsl:value-of select="greeting-text"/></li>
 </xsl:template>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Hello World!</title>
  <style type="text/css"></style>
  </head>
  <body>
    <h1>Symphony Greets the World</h1>
    <h2>Greetings</h2>
    <ul>
      <li>Hallo Welt</li>
      <li>Hello World!</li>
    </ul>
  </body>
</html>

No, Safari doesn't do this, nor does XSLT add empty attributes without being told.

So I am rather sure that it's a browser plugin in your case. Simply try it with Chrome or Firefox!

@ignism where are you getting the source code from?

  1. Symphony debug "result" page
  2. View page source
  3. Inspect element/development tools

@Pat that would be door nr. 3 inspect element.

Ah, I checked it with a clean install of chrome, and indeed the tag wasn't there.

Apparently it was indeed a Safari Extension (AdBlock). Problem solved guys! Thanks for your time.

To be clear, the element inspector shows the current state of the DOM not the page source. The Symphony debug view and using "view page source" will give you the actual source of the page sent by the server to your computer.

Sometimes I love to use Rested to check the page source for HTML, XML (RSS) or JSON pages. It's a great little app.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details