How can to customize front page of DHIS2

Dear @jomutsani,

Thanks you so much for your always quick response.

Dear @Lars could you help to provide support with my own CSS?

2 Likes

Welcome, @LCaynar!

Please check out the developer’s documentation on Developer’s guide - 1.74 UI customization as we await @Lars.

Best,
James.

2 Likes

Dear @jomutsani,

Thanks for your references; I have done it with UI customization.’

In addition, Could I customize form to take off

  1. Login using two factor authentication and replace it as Forget password

  2. To change message of Invalid Information Login to Wrong user name or password instead
2 Likes

@LCaynar do you mind explaining how you changed the image in the top left corner? I am having trouble doing so. Thanks!

3 Likes

Dear @berhard,

Sorry, I have not resolved this yet. Just solved some part on Appearance as Mr @jomutsani references.

Best Regards,

2 Likes

Hi @LCaynar and @berhard,

I was informed it is accessible from the developer’s side and has something to do with changing a few parameters on the style.css.

If you need an even higher level of customization, DHIS 2 lets you upload your own CSS files through the Web API. You can inspect the HTML structure and classes of the login page, create your own stylesheet (CSS file) and upload the file through the Web API. - @Lars from Webmasters Stack exchange

Maybe @Stian can advise more on this.

Best,
James.

4 Likes

Dear @jomutsani,

Thanks. I have done based on your references.

Best Regards,

3 Likes

Thank you for your regular feedback @LCaynar!
How is it now? Have you managed to customize the front page based on how you wanted it to appear?

James.

4 Likes

Dear @jomutsani,

Thanks I have done more on front page. In addition, I need one point which create an account button at the right top.

Best Regards,

4 Likes

Thank you, @jomutsani

Blake Erhardt-Ohren
MEL Technical Advisor, Management Information Systems

Email & Skype:
berhardt-ohren@pathfinder.org

Tel: +1.773.678.4083

4 Likes

Hi @berhard,

This is also in Settings - Apperance, under “Flag”. This will update the image in the top left corner. We have many country and organization flags but let us know if yours is missing on Jira and we will usually add them.

Best regards,
Karoline

5 Likes

Am failing to change the Application title as it keeps defaulting back to DHIS 2. The consoles show the below error, but am not sure how to resolve this:

Failed to load resource: the server responded with a status of 404 ()
:8443/api/38/systemSettings/applicationTitle?value=New Application Name&locale=en:1          Failed to load resource: the server responded with a status of 409 ()
Api.js:409 API request failed with status 409 
 Request: POST ../api/38/systemSettings/applicationTitle?value=New Application Name&locale=en
(anonymous) @ Api.js:409
settingsActions.js:19 Failed to save localized setting: Object
(anonymous) @ settingsActions.js:19

I have tried downloading the war file, but still getting the same error. DHIS2 version 2.38.0.

1 Like

Thank you for your post @WaluQ! I tried to replicate this on https://play.dhis2.org/2.38.0/dhis-web-settings/index.html#/appearance but I was able to change the application title. It’s not a bug but there’s something in the configuration that’s stopping this change.

Would you please share the Catalina.out log file (without the sensitive info) from after you try to make this change?

Thank you!

This is the log from Catalina.todaysdate.log. Not sure if that’s the one you meant?

24-May-2022 00:00:01.107 INFO [Log4j2-TF-8-Scheduled-1] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [org.apache.logging.log4j.core.pattern.NotANumber]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
	java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [org.apache.logging.log4j.core.pattern.NotANumber]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
		at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1440)
		at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1428)
		at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1267)
		at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1228)
		at org.apache.logging.log4j.core.appender.rolling.AbstractRolloverStrategy.getEligibleFiles(AbstractRolloverStrategy.java:93)
		at org.apache.logging.log4j.core.appender.rolling.AbstractRolloverStrategy.getEligibleFiles(AbstractRolloverStrategy.java:86)
		at org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy.rollover(DefaultRolloverStrategy.java:522)
		at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.rollover(RollingFileManager.java:502)
		at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.rollover(RollingFileManager.java:392)
		at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.rollover(RollingFileManager.java:367)
		at org.apache.logging.log4j.core.appender.rolling.CronTriggeringPolicy.rollover(CronTriggeringPolicy.java:149)
		at org.apache.logging.log4j.core.appender.rolling.CronTriggeringPolicy.access$100(CronTriggeringPolicy.java:41)
		at org.apache.logging.log4j.core.appender.rolling.CronTriggeringPolicy$CronTrigger.run(CronTriggeringPolicy.java:172)
		at org.apache.logging.log4j.core.config.ConfigurationScheduler$CronRunnable.run(ConfigurationScheduler.java:242)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
		at java.base/java.lang.Thread.run(Thread.java:834)
24-May-2022 00:00:01.107 INFO [Log4j2-TF-8-Scheduled-1] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [org.apache.logging.log4j.message.ParameterizedNoReferenceMessageFactory$StatusMessage]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
	java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [org.apache.logging.log4j.message.ParameterizedNoReferenceMessageFactory$StatusMessage]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
		at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1440)
		at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1428)
		at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1267)
		at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1228)
		at org.apache.logging.log4j.message.ParameterizedNoReferenceMessageFactory.newMessage(ParameterizedNoReferenceMessageFactory.java:105)
		at org.apache.logging.log4j.message.AbstractMessageFactory.newMessage(AbstractMessageFactory.java:75)
		at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2039)
		at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1907)
		at org.apache.logging.log4j.spi.AbstractLogger.error(AbstractLogger.java:871)
		at org.apache.logging.log4j.core.config.ConfigurationScheduler$CronRunnable.run(ConfigurationScheduler.java:244)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
		at java.base/java.lang.Thread.run(Thread.java:834)
24-May-2022 12:36:28.208 INFO [http-nio-8080-exec-18] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
 Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
	java.lang.IllegalArgumentException: Invalid character found in method name [0x050x010x00...]. HTTP method names must be tokens
		at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:434)
		at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:513)
		at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
		at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:882)
		at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1647)
		at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
		at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
		at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
		at java.base/java.lang.Thread.run(Thread.java:834)

I think @WaluQ that these issues could happen when there are caching issues. It might help to try to restart your instance and try again after restarting.

Thanks!

@Gassim I just restarted the server but still getting the same behaviour.

Hi @WaluQ

Could you please describe exactly the steps you are following to change the Title, and what behaviour you are seeing? (screenshots might also help).

Thanks,
Phil

1 Like



The first image shows what I am doing to change the Application Title and what I change it to. The Introduction changes just fine but the Application Title reverts back to DHIS 2. as in the second image. The third image is the console errors.

1 Like

Hmmmm… It’s strange that you can change the “Introduction” but not the "Title.

Can you try to change it via the API? e.g. running something like the following from the command line:

curl -X POST --user admin:district https://play.dhis2.org/2.38.0/api/38/systemSettings/applicationTitle\?value\=New%20Application%20Title\&locale\=en

With your own username:password and URL, of course

1 Like

Getting an error from the spring framework firewall, I need to check and it looks like I need to change something to allow the URL format. Ill try again once I figure that out.

1 Like