In my grails application I am using the spring-security-core:1.2.7.3 plugin with the famfamfam:1.0.1 plugin.
When I click on a link that takes me to the web application (and I previously selected the rememberme check box) it takes me to a secured page but no famfamfam images are displayed. In Firefox I can see the following error:
"NetworkError: 404 Not Found - http://localhost:8080/static/plugins/famfamfam-1.0.1/images/icons/user_suit.png;jsessionid=AB8FFF32A22F98573537A965694936AC"
Is there any way that I can prevent the 'jsessionid' from being appended to images?
Thanks!
See this link for a response from the plugin owner: https://github.com/xiaochong/zkui/issues/118.
The issue seems to relate to the resources plugin.
My workaround was to use a blank image in the zk item:
`<z:menuitem label="Home" height="80px;" top="40px;"
href="${createLink(uri: '/')}" image="/images/blank.png" class="menu_house"/>`
And then use a class to add the menu image:
.menu_house {
background-image: url("../images/house.png");
background-repeat: no-repeat;
background-position: left center;
}
I hope that helps to save someone time in the future.
Related
I need to add a custom logo to my Jenkins page which should appear on login page and post login pages as well.
As others pointed out, install the Login Page Theme plugin
Go to Manage Jenkins -> Configure System -> Login Page Theme
To change the logo, simply add the following style element in the Head section
<style>
.simple-page .logo {
background-image: url('https://www.jenkins.io/images/logos/snow/snow.png');
background-repeat: no-repeat;
background-position: 50% 0;
height: 350px;
background-size: contain;
}
.simple-page form {
width: unset;
max-width: unset;
}
<style>
To change the header text shown below the logo, add the following script element in the Header section
<script>
document.getElementsByTagName('h1')[0].textContent = 'Welcome to Balajee\'s Jenkins!'
</script>
Finally hit save and apply.
When you login next time, you should see something like this
As plugin page clearly says..
Only install this plugin, or make it available for installation, if you trust all your Jenkins administrators not to abuse these options.
I think you need to read this post on the Jenkins blog (assuming Jenkins >= 2.128):
New design, UX and extensibility digest for login page et. al.
Overview
... New design for the login and signup forms and Jenkins is (re)starting pages introduced in Jenkins 2.128 ... This meant to drop the usage of the jelly layout lib (aka xmlns:l="/lib/layout") and as well the page decorators it supported. However there is a new SimplePageDecorator extension point.
SimplePageDecorator - custom implementations
Have a look at Login Theme Plugin, which allows you to configure your own custom content to be injected into the new login/sign-up page.
The Simple Theme plugin can be used to customize the rest of the pages.
I am unable to get a Grails 2.5.2 application using the resources plugin to handle the cache-busting change made to CKEditor. The resources plugin is configured as follows:
grails.resources.adhoc.patterns = ['/js/*', '/images/*', '/css/*', '/plugins/*', '/thirdparty/*', '/templates/*']
grails.resources.adhoc.includes = ['/js/**', '/images/**', '/css/**', '/plugins/**', '/thirdparty/**', '/templates/**']
The CKEditor code is placed under app-dir/web-app/thirdparty/ckeditor and is currently at version 4.5.9. The cache-busting change was made in 4.5.5, and version 4.5.4 works perfectly with grails resources.
I get the following error in the console when running the app with 4.5.9:
GET resource:/thirdparty/ckeditor/skins/moono/icons.png?t=a35abfe net::ERR_UNKNOWN_URL_SCHEME
It seems that the resources plugin is not coping well with values in ckeditor's editor.css file (a file served by the app points to app-dir/thirdparty/ckeditor/skins/moono/editor.css?t=G4CD as http://localhost:8080/app-dir/static/thirdparty/ckeditor/skins/moono/editor.css?t=G4CD). If I look at this file directly, it contains the following for the icons.png and icons_hidpi.png files, indicating that the resources plugin is incorrectly replacing the image file link (all but the first, actually) with a "resource:/..." url that shouldn't need to be there, and hence the console error. Curiously, it is only the icons.png and icons_hidpi.png files with their t parameter that get changed in this manner, other image files in the same editor.css file are left alone.
.cke_button__bold_icon {background: url(icons.png?t=a35abfe) no-repeat 0 -0px !important;}
.cke_button__italic_icon {background: url(resource:/thirdparty/ckeditor/skins/moono/icons.png?t=a35abfe) no-repeat 0 -24px !important;}
.cke_button__strike_icon {background: url(resource:/thirdparty/ckeditor/skins/moono/icons.png?t=a35abfe) no-repeat 0 -48px !important;}
.cke_button__subscript_icon {background: url(resource:/thirdparty/ckeditor/skins/moono/icons.png?t=a35abfe) no-repeat 0 -72px !important;}
If I add the following configuration, the app runs and displays perfectly.
grails.resources.processing.enabled = false
If I use
grails.resources.mappers.cssrewriter.excludes = ['/thirdparty/ckeditor/skins/moono/**']
in an attempt to prevent resources from modifying ckeditor's editor.css file, nothing seems to change.
What can I do? I can't leave ckeditor at 4.5.4, as there is an interaction with it that I'm trying to fix. I'm already using the same configuration as recommended in another post, but that does not fix the problem. Disabling css rewriting altogether just breaks other plugins.
The eventual solution (recommended by a colleague) is to exclude the specific CSS file(s) from being processed by grails resources:
resource url:"thirdparty/ckeditor/skins/moono/editor.css", exclude: "*"
This avoids affecting other files that were either unaffected by the upgraded CKEditor, or benefited from the processing done by grails resources.
I am trying to debug a crashing application in Microsoft Edge, but it gives the friendly error page:
This page is having a problem loading
We tried to load this page for you a few times, but there is still a problem with this site. We know you have better things to do than to watch this page reload over and over again so try coming back to this page later.
In internet explorer there is a way to turn off the friendly error messages. Is this also possible in Microsoft Edge? I'd like to know on which line of code the problem occurs.
It seems there are none at the moment. You can use the F12 developer tools for debugging though. The friendly page includes the actual HTTP response code so you can have an idea. Also, if you require more details you can check the full details on the request/response using the F12 Network tool to get the data the server is responding with.
You are probably affected by this unclosed bug.
No easy way to fix it right now, the not friendly error message will probably not help much (as you are not getting a server side HTTP error, is just the browser that raise an error and truncate the communication).
On the other hand the developer tool will not help also: Edge "smartly" close automatically it when the error happens and if you reopen the history is empty (no way to keep it, tried all of the buttons).
I have this issue on a site I'm developing but I'm not able to understand what's happen.
EDIT - after a long time I fixed this issue in my environment. Unluckily I'm pretty sure this will not help too much other devs because the bug seems to happen for a lot of different reason, but still... that's my usecase.
What was freezing my site was a combination of CSS media-queries (follow the less used):
#media (min-width:calc(#screen-mobile-size + 1px)) {
.hero_mobile {
display: none;
}
.hero_desktop {
display: inline;
}
}
...and few lines below...
#media (max-width: #screen-mobile-size) {
height: auto;
max-height: 600px;
.hero_mobile {
display: inline;
}
.hero_desktop {
display: none;
}
}
I tested a lot of combination but there's only one rule: I can't provide both media queries, it doesn't matter what there's inside them! It simply break the browser.
In my case the fix was quite easy: just preventing the first CSS rule to be embedded inside a media query, so...
.hero_mobile {
display: none;
}
.hero_desktop {
display: inline;
}
// ...
#media (max-width: #screen-mobile-size) {
height: auto;
max-height: 600px;
.hero_mobile {
display: inline;
}
.hero_desktop {
display: none;
}
}
When you see that, try hitting F12 and in debugger tab, setting break-on-all-errors. When you refresh, the last one it breaks on before the page reloads for some odd reason and triggers that error page, is likely the thing triggering some obscure bug.
You will likely find that Edge doesn't handle jQuery("someselector:visible") and refreshes, yet it does work with jQuery("someselector").filter(":visible"), but that's likely just an obscure bug in old jQuery 1.x.
I want to change background images, logo ,headings and add some buttons.
I have the following UI related plugins installed
1) Simple Theme Plugin
A plugin for Jenkins that supports custom CSS & JavaScript. You can customize Jenkins's appearance (ex. his gentle face on the background).
version 0.3
2) UI Themes: Plugin
This plugin provides UI themes for Jenkins.
version 2.1.1
I have found some answer regarding the same but didn't find much help.
-->> Customising Jenkins' appearance to make it easier to tell instances apart
-->> http://isotope11.com/blog/styling-your-jenkins-continuous-integration-server
Please give steps or any links from which I can completely change the appearance of my Jenkins server.
If you are comfortable with CSS styling, you could create a theme, by making a CSS styling file and uploading it to a directly-serving server (Even the one your using for jenkins, in a new folder) or JavaScript styling (same diddy) could be added to the option at your jenkins {host}/configure under "Theme". However, in my experience the 1.609.1 version of jenkins does NOT support this plugin properly in OpenShift Cloud hosting.
You can see an example of full theme in progress in jenkinsci/dark-theme.
It is not yet ready, but can illustrate how the CSS is setup with a Jenkins 2.220+ (May 2020)
If you are comfortable in CSS, you can easily customize logo and titel in theme with .css file.
For example, I have added JENKINS_HOME/usercontent/mytheme.css file JENKINS_HOME/usercontent/logo.png as my logo and follow the css below:
#charset “utf-8”;
#header .logo {
height: 36px;
}
/* Custom style for my Jenkins Platform */
.logo {
background: url(/userContent/logo.png) no-repeat 10px center;
}
.logo img {
display: none;
}
.logo:after {
content: 'Jenkins my instance';
font-weight: bold;
white-space: nowrap;
} // Content after logo
Just check in Configure System --> Theme you must give CSS path of above mytheme.css file. & Refresh your Jenkins Page.
See the reference LINK here !
I have a page with this code (generated by JSF 2.1.3 running on Glassfish 3.1.1
<a class="pagenumber"
onclick="mojarra.ab(this,event,'click',0,'main:coupon-all main:page-top main:page-bottom');return false"
href="#"
id="main:j_idt221:0:j_idt224">1</a>
This is generated from this part (inside a ui:repeat):
<h:commandLink styleClass="pagenumber">
<f:ajax listener="#{productDetailInfoView.changePage(page)}"
render=":main:page-top :main:page-bottom :main:coupon-all"/>#{page}
</h:commandLink>
Where:
:main:page-top is the ID of the top of the page navigation
:main:page-bottom is the ID of the bottom of the page navigation
:main:coupon-all is the ID of the ui:repeat that lists all the products in the page
ISSUE:
On most browsers (as usual) and also IE 7 and IE 9, everything is just fine. But on IE8 (mostly on Windows XP but probably on Vista/8 too), the browser crashes and reload the page saying it has "recovered" it (sometimes shows the "Crash report" page and ask to send report to MS or cancel).
Additional info:
I actually spent quite a lot of time debugging this, and the issue seems to be in the jsf.js (I use Stage: development to get the full version), in the ajax response part. But I couldn't find which precise part of it because after debugging the jsf.ajax.request(...) part then it's all asynchronous and I got stuck with nowhere to break-point. Sending the request seems ok as the browser crashes when this call completes.
Now the thing is that if I remove one of the element to re-render (either one of the navigation bar or the list of products), the remaining elements are rendered without error. However I need all the 3 elements rendered, not just two...
EDIT: 12/07/05
I found that a highly connected item to the issue is PIE.htc for the round corners. Many of the elements in the 3 blocks I need to re-render have styleClass that use CSS like this:
.round {
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
behavior: url('../PIE.htc');
-khtml-border-radius: 5px;
}
The PIE.htc file is found and round corners are correctly displayed in IE7 and 8 as expected. However it makes the page very very slow on these IE browsers (I don't mind, I have been allowed to remove round corners for IE).
BUT the very weird thing is that if I simply remove all reference to PIE.htc in the CSS, then I still have the error. Maybe the other border-radius are creating issue. I am currently trying to remove any kind of round corner, even for all browsers and see where it leads.
My page is also XML validated.
Any help appreciated...