Personal tools
You are here: Home Forums Plone SEO Incorrect base tags from renderBase()
Document Actions

Incorrect base tags from renderBase()

Up to Plone SEO

Incorrect base tags from renderBase()

Posted by Aphyr at April 03. 2009

Not sure where to send this really. Quintagroup.SEOptimizer caused our site to explode in truly horrific ways in IE 6. Specifically, it generated <base href="1" /> tags which caused all image references to look for http://1/path/to/image.

I'm not an expert on plone development, but I think you should change quintagroup.seoptimizer-2.0.2-py2.4.egg/quintagroup/seoptimizer/browser/viewlets.py to do this instead (in keeping with plone core):


<code>
def renderBase( self ):
        # returns correct base href
        context = self.context.aq_inner

        # when accessing via WEBDAV you're not allowed to access aq_explicit
        try:
            if getattr(context.aq_explicit, 'isPrincipiaFolderish', 0):
                return context.absolute_url()+'/'
            else:
                return context.absolute_url()
        except (Unauthorized, 'Unauthorized'):
            pass
</code>


 


Email me at aphyr@aphyr.com if you've got questions, or if there's a better place to submit this.


Re: Incorrect base tags from renderBase()

Posted by Ihor Berehulyak at April 03. 2009

What version of Plone do you have?


Re: Incorrect base tags from renderBase()

Posted by Aphyr at April 04. 2009

  • Plone 3.1.7
  • CMF 2.1.1
  • Zope (Zope 2.10.6-final, python 2.4.4, linux2)
  • Python 2.4.4 (#2, Oct 22 2008, 19:52:44)
    [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)]
  • PIL 1.1.5

Re: Incorrect base tags from renderBase()

Posted by Vitaliy Stepanov at April 16. 2009

This issue was fixed in 2.0.5 version. Please use that version.


Powered by Ploneboard