I have a plone-site where I want to use collective.htmltopdf based on wkhtmltopdf for PDF-generation.
However when I print my site, the diazo theme doesn't get applied. The header HTTP_X_THEME_ENABLED is correctly passed to diazo.
There is no condition in rules.xml. The pages in question are public. I tried HTTPS and HTTP.
Why do the diazo rules not apply to wkhtmltopdf?
UPDATE I
The above is not true, when using wkhtmltopdf from my workstation. Smells like routing...
It is the way collective.wkhtmltopdf deals with the page source: It gets generated from a view (not via https) and looses the information about the theme there. When I quick-hack a url-source into the source, everything works as expected.
In collective.sendaspdf-3.0-py2.7.egg/collective/sendaspdf/transforms/wk.py
# Run the wkhtmltopdf command.
args = [wk_command,
'--disable-javascript',
'--encoding',
'utf-8',
'http://ww2.mypage.com',
#'file://%s/%s' % (export_dir, html_filename),
'%s/%s' % (export_dir, filename)]
This cries for a pull request...
Related
This line of code appears in the html of my wordpress website.
<meta http-equiv="imagetoolbar" content="no"><!-- disable image toolbar (if any) -->
It is some legacy code relating to images on IE6, and is no longer needed.
It's invalid html, in fact.
I want to remove it, but I cannot find where this line of code was generated.
It does not appear to be in any theme files.
Does anyone know what plugin might have produced that line of code?
In my case the plugin "All In One Wordpress Security" added the code as part of it's "Copy Protection" security setting.
It is located under:
Dashboard -> WP Security -> Miscellaneous -> Copy Protection..
[ ] Check this if you want to disable the "Right Click", "Text Selection" and "Copy" options on the front end of your site.
As pointed out by #sparky It is not necessary to hunt down references to this line of code or remove it from one's website.
In my case I became obsessed in achieving 100% HTML validation.
As #sparky noted in comments to his question "...It's only applicable to IE version 6 and all other browsers will ignore it."
He also updated his answer to indicate that IE8 and IE7 no longer reference it.
While HTML validation notes it as an "Error", in practical use it is not harmful, and does not necessarily need to be removed.
If you do want to remove this code, there are a couple of methods you can use to find where it is being added to your website (assuming WordPress - modify as needed)
search your /wp-content/plugins folder for the term imagetoolbar (suggested by #anmari)
disable plugins one by one (or via divide and conquer), empty all caches (including CDN), View Source (or run validator) ... until the code goes away. Or do the same in reverse: Disable everything, then enable to find the culprit.
On my site there were two plugins that could add that code were:
"CornerStone"
"All In One WP Security & Firewall" (as labeled in the WordPress.org plugins repo),
("All In One WP Security" as listed under your site Plugins, and
"WP Security", as labeled in your Dashboard)
AnMari notes that "gravityforms" and some themes may also use this code.
I am working on this webpage:http://hypoinvest.sk/ which runs on Wordpress with this theme If you check source code you can see a lot of inline-css and I want to know in which files are actually defined. Only thing what I know about it they are called by function wp_head() in header.php. I have local copy of all files on this web and I can't find any mention about some of that css rules through unix grep. Anyone suspect where these css rules could be located?
check site and let me know.
Run a search in the source code for
style-inline
As this appears to be the 'handle' designated as the first variable in the function wp_add_inline_style. The "-css" is added automatically. You'll see this on line 79 of the page source.
https://codex.wordpress.org/Function_Reference/wp_add_inline_style
You want to check your page back-end site where you put content ,
I think are you using any compose or editor to create page on edit page.
check it edit option it has some inline css.
Using developer tools, I can amend a css file for a site I'm currently viewing in a browser.
I want to, effectively, do the same - but instead of amending the css file, loading a local css file, just for that particular domain.
Another way of phrasing it: "When any page of stackoverflow.com is loaded, load C:\test.css to the browser".
Yes, it's possible. Have a look at http://userstyles.org.
Userstyles.org offers CSS files for usage with the extension "Stylish", and Stylish recently announced that they are becoming evil (https://forum.userstyles.org/discussion/comment/109966/#Comment_109966) and can therefore not be used anymore.
One can use the styles with greasemonkey, but then the activation for various websites doesn't work anymore (the CSS is converted into a JS file and the list of sites where it should be applied onto is hardcoded inside an if-statement in that script). I.e. in order to use e.g. "dokuwiki highlight and full width" on a site using dokuwiki but not being http://dokuwiki.org, you have to edit that if-statement and reload.
in my Drupal site
http://www.revdup.co.uk
I recently changed the domain name, I had to change a few absolute URLs and everything seems to be working fine now, except the front page, and only when I am logged in, not as a guest..
for some reason all the theme images (such as those used to build blocks appearance) are using an incorrect version of the base URL eg:
revdup.co.uk/revdup/themes/drupal_pwc010_tech/images/Block-s.png
instead of:
revdup.co.uk/themes/drupal_pwc010_tech/images/Block-s.png
I have changed the base URL variable in settings.php
Why is this only happening on one page and how can I fix it?
You'll need to explicitly clean the template cache. Go to Administrator->Themes->Selected theme->configure->Save.
This will regenerate the template cache with correct urls. Also clear the drupal cache in Admin/settings/performance.
Is there a built in way to change the favicon for different themes? If not would it be as simple as creatign a custom control to emit the link tag with the correct url to the icon?
Update
So based on what I have found in order to do this, it looks like I am going to have to create an http handler that will intercept all calls for favicon.ico.
This handler will then determine which theme we are using (in my case it will be based on the domain name), it will then output the themed favicon.ico from the various themes folders.
Since I am supporting IE7, I'm thinking this is the only option I have. Still curious if anyone else has a better way.
As long as your user is not using IE, that should be fine. IE (up to at least version 7) only reads the favicon.ico file and completely ignores the link tag.
After some research and thought It looks like the only way to do this and still support IE7 and earlier (I am not sure if IE8 updated support for favicon or not). Would be to dynamically serve the icon to do this you can do the following:
Create and register an HttpHandler to process requests for FavIcon.ico
Configure IIS to send requests for .ico files to ASP.Net (If your using IIS6 or earlier)
Run the logic that you use to determine which theme and from that find the .ico your going to serve up, and send it to the browser.
Note that per W3Schools
http://www.w3schools.com/browsers/browsers_stats.asp
You should expect about 1/2 your users to be using IE.