Page 1 of 2

cannot find "theme.css" resource of "primefaces-harmony-rebirth" library

Posted: 11 Jul 2018, 17:06
by senleft
Hello,

I trying to run the provided harmony-1.0.2 sample project on the IBM liberty 17.0.0.1. The Liberty JSF implementation is based on the MyFaces open source implementation.
So I removed the org.glassfish:javax.faces:2.2.8 dependency to exclude extra JSF implementation.
Application deployed successfully.
When I try to open it in browser the below error occurred:

Code: Select all

Exception thrown by application class 'javax.faces.webapp.FacesServlet.service:214'
javax.servlet.ServletException: Error loading css, cannot find "theme.css" resource of "primefaces-harmony-rebirth" library ...
Caused by: javax.faces.FacesException: Error loading css, cannot find "theme.css" resource of "primefaces-harmony-rebirth" library
I checked the referenced library and found that only theme.scss is available

Am I missed required steps for preparing harmony-1.0.2.war ?

Re: cannot find "theme.css" resource of "primefaces-harmony-rebirth" library

Posted: 12 Jul 2018, 07:43
by huseyinT
You need to run sass files.

sass --update src/main/webapp/resources/ --sourcemap=none

or

sass -w src/main/webapp/resources/ --sourcemap=none

You can read the documentation

http://primefaces.org/harmony/docs.xhtml

Re: cannot find "theme.css" resource of "primefaces-harmony-rebirth" library

Posted: 19 Jul 2018, 19:15
by senleft
Hello,

After installing the sass I tried to execute:
1.

Code: Select all

sass --update src/main/webapp/resources/ --sourcemap=none
Could not find an option named "sourcemap".
2.

Code: Select all

sass --update src/main/webapp/resources/ --no-source-map
--update is not allowed when printing to stdout.
3.

Code: Select all

sass -w src/main/webapp/resources/ --no-source-map
Could not find an option or flag "-w".
None from two provided commands working.
Could you please provide and update the documentation with the commands that will work with the current sass version or specify the sass version that understands provided commands?

Re: cannot find "theme.css" resource of "primefaces-harmony-rebirth" library

Posted: 19 Jul 2018, 20:22
by huseyinT
I tested sass version 3.5.5, it works.

Could you try Sass version 3.5.5 ?

Re: cannot find "theme.css" resource of "primefaces-harmony-rebirth" library

Posted: 19 Jul 2018, 23:21
by senleft
With sass 3.3.5:

Code: Select all

sass --update src/main/webapp/resources/ --sourcemap=none
OptionParser::NeedlessArgument: needless argument: --sourcemap=none
  Use --trace for backtrace.

Code: Select all

C:\Users\alex>sass -v
Sass 3.3.5 (Maptastic Maple)

C:\Users\alex>sass -h
Usage: sass [options] [INPUT] [OUTPUT]

        --sourcemap                  Create sourcemap files next to the generated CSS files.
So the correct command should be:

Code: Select all

sass -w src/main/webapp/resources/
I believe that you should specify the correct sass version in the documentation.

CSS not applied after the theme switching

Posted: 20 Jul 2018, 00:19
by senleft
After CSS generation I started the jetty container.
I found that after the theme changing the CSS is not applied on the sample pages.
You may see it on the following link https://yadi.sk/i/Kp39ucib3ZNBFL
Is it expected?

Re: cannot find "theme.css" resource of "primefaces-harmony-rebirth" library

Posted: 20 Jul 2018, 10:09
by huseyinT
I prepare according to the http://primefaces.org/harmony/docs.xhtml , screens.

First screen is about the SASS version and sass --update src/main/webapp/resources/ --sourcemap=none :

https://ibb.co/fAzxWy

After, I command mvn jetty:run, and all browser is like following:

https://ibb.co/ny1QjJ

There is not a problem.

Please check your console. Are you getting an error in the console?

You could delete your cookies ( for chrome : ctrl + shift + delete )

Re: cannot find "theme.css" resource of "primefaces-harmony-rebirth" library

Posted: 03 Aug 2019, 06:01
by dimondi21
Hello all.

I'll like to share my experience, now I'm facing the same problem. I'm using exactly the same harmony project (there's no problem at all). When I just rename the project I'm facing this issue.

I ran sass, and my web see like this https://ibb.co/Swk83k9

I'm starting to think that buying a primefaces premium theme is a waste of money.

Do you know how I can fix this?

Re: cannot find "theme.css" resource of "primefaces-harmony-rebirth" library

Posted: 03 Aug 2019, 12:19
by mert.sincan
Do you get an error as 404 not found url on console/network?

Re: cannot find "theme.css" resource of "primefaces-harmony-rebirth" library

Posted: 05 Mar 2021, 03:06
by Juan Dominguez
Hello
I think the problem is that you are not addressing the output of the compiled css

sass --update src/main/webapp/resources:src/main/webapp/resources --sourcemap=none