Prestashop Core Application V1.4

header_link_bookmark is broken in Chrome

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Fix Version/s: None
  • Component/s: None
  • Security Level: All-users
  • Labels:
  • Web Site URL:
  • Similar issues:
    PSCFI-5399 Chrome Errror file
    PSCFI-1517 Color Picker for Attributes broken in firefox 4
    PSCFI-4512 switch rates broken
    PSCFI-1634 Color Picker for Attributes broken in firefox 4 - Second problem
    PSCFI-812 Javascript problems in Chrome
    PSCFI-3729 Non secure https on chrome
    PSCFI-5621 Chrome ajax and login issue
    PSCFI-962 User registration not displaying States in Chrome
    PSCFI-4711 new_theme Prestashop - Not assigned a function, or broken
    PSCFI-869 Onepage checkout vs. Chrome 11
  • Web browser:
    Google Chrome 6, Google Chrome 7, Google Chrome 8, Google Chrome 9, Google Chrome 10, Google Chrome 11

Description

The Bookmark button doesn't show up in the header only in Chrome, although the Contact Us and Sitemap buttons work fine. Everything works in Firefox and IE.

Activity

Hide
Bruno LEVEQUE added a comment - 30/Sep/11 10:06 PM

There was something specific in the code:

if browser == chrome, then: do nothing

With a comment from the developer: "Chrome doesn't allow the document.write function".

However, we tried and actually, it worked.

In js/tool.js you can delete lines 143 and 144

if (window.navigator.userAgent.indexOf('Chrome') != -1)
		return ('');

and modify "else if" to "if" on line 145.

Final result:

function writeBookmarkLinkObject(url, title, insert)
{
	if (window.sidebar || window.external)
		return ('<a href="javascript:addBookmark(\'' + escape(url) + '\', \'' + escape(title) + '\')">' + insert + '</a>');
	else if (window.opera && window.print)
		return ('<a rel="sidebar" href="' + escape(url) + '" title="' + escape(title) + '">' + insert + '</a>');
	return ('');
}

Thanks for your feedback.

Show
Bruno LEVEQUE added a comment - 30/Sep/11 10:06 PM There was something specific in the code:
if browser == chrome, then: do nothing
With a comment from the developer: "Chrome doesn't allow the document.write function". However, we tried and actually, it worked. In js/tool.js you can delete lines 143 and 144
if (window.navigator.userAgent.indexOf('Chrome') != -1)
		return ('');
and modify "else if" to "if" on line 145. Final result:
function writeBookmarkLinkObject(url, title, insert)
{
	if (window.sidebar || window.external)
		return ('<a href="javascript:addBookmark(\'' + escape(url) + '\', \'' + escape(title) + '\')">' + insert + '</a>');
	else if (window.opera && window.print)
		return ('<a rel="sidebar" href="' + escape(url) + '" title="' + escape(title) + '">' + insert + '</a>');
	return ('');
}
Thanks for your feedback.

People

Vote (0)
Watch (0)

Dates

  • Created:
    29/Sep/11 3:47 PM
    Updated:
    27/Nov/11 8:43 AM
    Resolved:
    30/Sep/11 10:07 PM