Symptom

When a watermark is set, it does not display on all pages.

Root cause

Because the watermark url is a relative one, the file is sometimes not found. Whether or not it is found depends on the url of the current page. In practice, watermarks do not work for pages that have a url which is "deeper than a single level".

Steps to reproduce

  • Enable watermark
  • Make an aliased node, access it via "http://my.site/alias": watermark is displayed correctly
  • Access the node via its node id "http://my.site/node/1": watermark is not displayed correctly

Solution/workaround

Make sure the watermark url is absolute.

  1. Edit templates/page.tpl.php
  2. Find $header_watermark_style = 'background-image: url(' . drupal_get_path('theme', 'mayo') . '/images/pat-' . $header_watermark . '.png);';
  3. Replace it with $header_watermark_style = 'background-image: url(' . $base_path . drupal_get_path('theme', 'mayo') . '/images/pat-' . $header_watermark . '.png);';

Comments

permafix’s picture

Was it the same thing with the header image? I have the same problem with this image

permafix’s picture

I solved the problem by create a view for each content and not only a basic page. The header image apprear only on views.

monsoon’s picture

Hi,
I have similar problem with MAYO header image, not appearing in IE. Can you please explain, how can I create view and then put image sothat it can show up in all browsers.
Thanks.

permafix’s picture

For IE, try this :

In the page.tpl.php of the theme (\themes\mayo\templates), change the line:

$header_style .= 'background: url(' . $header_bg_file . ') repeat ';
to
$header_style .= 'filter:;background: url(' . $header_bg_file . ') repeat ';

I hope this wil help you

mermentau’s picture

Status: Active » Reviewed & tested by the community

This really became 2 issues:

  1. I tried to reproduce the watermark issue of the OP with the latest Dev version and Pathauto installed. I created a really long url alias which was for node/21. Both ways I got the water mark and the code in page.tpl.php is the same as the before state mentioned. This can be re-opened if the issue is still there after 7.x1.2 is released.
  2. I did find that after adding a header image that it was not showing in IE8 but was visible in FF7 and Chrome . Applying the fix in #4 by permafix worked. It will be in the next Dev commit.
mermentau’s picture

Status: Reviewed & tested by the community » Closed (fixed)
MiraKimura’s picture

Status: Closed (fixed) » Needs review

Latest Drupal 7 and Mayo.

The watermark problem solved. But not the image. I've uploaded custom header image, but doesn't appear.

Removed the first "/" at (Advanced header settings > URL of the header background image), and it appears!!

But only for the main page, not others. Except for user and sitemap page.

Please help! TQ!

mermentau’s picture

Status: Needs review » Closed (fixed)

This was a watermark issue that was solved and morphed over to concerns over header images. Could you open a separate issue so that others with similar problems could find it?
This was a 7.x-1.1 issue so be sure and indicate the version you are seeing the problem in and steps we can use to re-create the bug. Thanks,

arelem’s picture

Version: 7.x-1.1 » 7.x-1.2
Assigned: Unassigned » arelem
Status: Closed (fixed) » Needs work

Drupal 7.12.
I have recently downloaded Mayo themesto 4 installations over th past 3 weeks and it is not fixed.
The watermark is very intermittent, works on only 1 of my installations from 6 months ago.

mermentau’s picture

Version: 7.x-1.2 » 7.x-1.1
Status: Needs work » Closed (fixed)

@arelem, You are just creating confusion coming in everywhere and changing the version on old bugs and re-opening them. At the same time you offer no information how we can re-create your specific problem. Please open a fresh issue and detail how we can duplicate your issue so that we might verify and solve.