Page 1 of 1

Summary Reports bug

Posted: 2019-08-06 04:54
by Jay Webb
Ok, Summary Reports has bad path for header-extra.
If I add background image to header-extra with an image path," hooks/images/image.png"
Summary Reports throws an error bad path body background image shows path as "hooks/hooks/images/image.png"
and therefor no background image.
If I change path in header-extra path to, "images/image.png" it displays correctly in Summary Reports, but all other pages have no background image
and error, bad path.

I've tried to find a way to correct but no luck. Hope there's a fix.

Re: Summary Reports bug

Posted: 2019-08-31 15:24
by kbarrett
Hi,

Not really a fix, a work around. I inspected the broken image link in the console and found that the browser is looking for images in the hooks folder. I added an images folder with the appropriate image header and all works. I don't even have to add an image url to the report when I am creating it.

Cheers,

Re: Summary Reports bug

Posted: 2019-10-16 14:27
by a.gneady
Sorry for the late reply as I just saw this thread now. Generally, if you're pointing to resources in footer-extras.php or header-extras.php, you should use the predefined constant PREPEND_PATH before the resource path, and then list the path relative to the app path ... So, if the resource is an image stored as hooks/images/image.png (as per your example), you should point to it in header-extras.php like so:

Code: Select all

<img src="<?php echo PREPEND_PATH; ?>hooks/images/image.png">
That way, pages stored anywhere on the app would correctly point to it.

Re: Summary Reports bug

Posted: 2019-10-20 14:15
by onoehring
Hi Ahmed,

this is a good tip (tips & tricks?) but unfortunately it is not mentioned in the documentation yet :-(

Olaf