Error while Extending classic Theme Liferay 7.3 - gulp

I am facing a problem while triying to extend classic theme(even if it s not recomended), but with the new Style book capabilities of liferay it's a good opportunity for us to speed up our theme creartion.
I have created a basic theme project using "yo liferay-theme" generator build my theme and deploy it, everythings OK.
Then i downloaded the necessary files from lifery frontend-theme-classic github repo : [https://github.com/liferay/liferay-portal/tree/7.3.x/modules/apps/frontend-theme/frontend-theme-classic][1] [1]: https://github.com/liferay/liferay-portal/tree/7.3.x/modules/apps/frontend-theme/frontend-theme-classic i add the folders : css, images, templates and some necessary changes under the WEB-INF directory. When i run gulp build i got an error about undefined variables.
Here is the error message after a gulp:build :
Starting 'build:compile-lib-sass'... [23:21:28] 'build:compile-lib-sass' errored after 1.94 s [23:21:28] Error in plugin 'gulp-sass' Message: build_css\custom_properties_custom_properties_variables.scss Error: Undefined variable: "$btn-link". on line 10 of build/_css/custom_properties/_custom_properties_variables.scss from line 1 of build/_css/_custom_properties.scss from line 13 of build/_css/_custom.scss from line 21 of build/_css/main.scss
link: $btn-link,
--------^
Details: status: 1 file: C:/Users/sgFSJESO/ump-theme/build/_css/custom_properties/_custom_properties_variables.scss line: 10 column: 9 formatted: Error: Undefined variable: "$btn-link". on line 10 of build/_css/custom_properties/_custom_properties_variables.scss from line 1 of build/_css/_custom_properties.scss from line 13 of build/_css/_custom.scss from line 21 of build/_css/main.scss
link: $btn-link,
If anyone has solved this issues i would be happy to understand why.

the error indicate that some of variable not able to find through theme. so make sure if

I had the same problem, I fixed it with the library Clay, I copied all the folder at \src\css\clay

To rebuild the "classic" theme, you should take these 2 steps:
copy the source code from https://github.com/liferay/liferay-portal/tree/7.3.x/modules/apps/frontend-theme/frontend-theme-classic,
set the right versions for the parent themes in your theme build.gradle file:
The latest 7.3.x classic theme is dated with June 24, 2021. So I set the closest versions for parent themes as:
parentThemes group: "com.liferay", name: "com.liferay.frontend.theme.styled", version: "5.0.25"
parentThemes group: "com.liferay", name: "com.liferay.frontend.theme.unstyled", version: "5.0.26"
portalCommonCSS group: "com.liferay", name: "com.liferay.frontend.css.common", version: "5.0.6"
I also added
cssBuilder group: "org.slf4j", name: "slf4j-simple", version: "1.7.10"
Hope this will help you.

Related

Angular Storybook cypress tests failing on Azure pipelines during build

I have a libs component project. Recently we updated to Angular 14 to Angular 15
Locally when i run npm run storybook:cypress - all works fine and tests have passed.
But when the tests are run on Azure on pull request - they fail with next error:
The injectable 'PlatformLocation' needs to be compiled using the JIT compiler, but '#angular/compiler' is not available.
And i totally have no idea what is wrong, all similar information in the Web is related to updating Angurlar to 13 version.
What i'm trying to say, if the configs were wrong, then it would fail already on Angular 14. Where i should start digging?
I have tried:
removing angularCompilerOptions from TSconfig.lib.json ( prod also )
adding compilationMode = full instead of current partial from TSconfig.lib.json ( prod also )
checked that test-setup.ts imports 'jset-preset-angular/setup-jest' instead of simple setip-jest
I have checked that PlatformLocation is not used somewhere incorrectly, e.g. imports component instead of module ( but my code doesn't use that at all )
Project structure is next:
apps
--myproject-e2e
----src
----cypress.json
----tsconfig.json
libs
--myproject
----src
----package.json
----tsconfig.json
----tsconfig.lib.json
----tsconfig.lib.prod.json
package.json
angular.json
jest.config.json
jest.preset.json
tsconfig.json
tsconfig.base.json

BigCommerce stencil bundle theme validating issues in schema.json file

Hello developers out here!
I struggle with stencil bundle and stencil push issues.
I get error at "Validating theme..."
Error: Your theme's schema.json has errors:
schema[1].settings[28].options[0].value should be string,number
schema[1].settings[28].options[1].value should be string,number
...
It seems that I get this issue after try to test latest cornerstone (5.4.5) theme version, and update stencil-cli and now I can't use oldest version (1.10.0) schema.json file -> https://github.com/bigcommerce/cornerstone/blob/1.10.0/schema.json
Now it only works with these two files:
schema.json -> https://github.com/bigcommerce/cornerstone/blob/4.5.4/schema.json
schemaTranslations.json -> https://github.com/bigcommerce/cornerstone/blob/4.5.4/schemaTranslations.json
But I am not sure how it would impact live site work if I use different schema files.
It is possible to work again with old schema.json file?
Previously all worked...
I tried to:
delete all node_modules
reinstall #bigcommerce/stencil-cli
and node modules (npm install)
These look similar to errors when the schema.json or schemaTranslations.json file have been removed or modified, could you add any relevant schema code in your post? Since Stencil CLI 2.0, part of the bundle process now validates a schemaTranlsations.json file which has been included since Cornerstone 4.5.4. This change can be found on the GitHub repo here as well as on our DevCenter Changelog.
Hello #dakterits and #kyle-obrien
The error which you mentioned means that option number 0 and 1 in setting number 28 in the schema file has either empty value or different value. So, to fix this issue, you don't have downgrade the node or reinstall stencil or delete any file.
The Solution:
Download the original copy of the theme.
Edit the original theme schema file.
If you have any file compare software then compare edited theme schema with original theme schema.
Once you compare, you will definitely see any change in value in defined settings.

Another one "You don’t seem to have a generator with the name"

I'm trying to make a simple Yeoman generator in ES6.
I think I followed the documentation.
After $npm linkin the current folder of my generator i go in another directory and try :
? 'Allo Emmanuel! What would you like to do? (Use arrow keys)
Run a generator
❯ Starterpack
──────────────
Update your generators
Install a generator
Find some help
Get me out of here!
──────────────
My Generator seem to be avaible, but not :
Make sure you are in the directory you want to scaffold into.
This generator can also be run with: yo starterpack
Error
You don’t seem to have a generator with the name “starterpack:app” installed.
If needed all code are available here : https://github.com/ethyde/generator-starterpack
What I did wrong ?
Thanks.
EDIT : Fixed, thanks, I have updated the repo with the answer.
Your generator is not exporting a standard node module. See this line https://github.com/ethyde/generator-starterpack/blob/master/generators/app/index.js#L77
Babel by default compile es6 module files to exports.defaults. Yeoman expects a usual Node.js export. In other words, it expects your generator to be exported as module.exports = Generator.
You'll need to update your babel configuration.

Monodevelop fails to build, can't find Microsoft.DiaSymReader.Native.x86.dll'

I am trying to build a web api project using monodevelop on a mac. The thing is that after a few hiccups (explained in a question that turned out to be so messy I have just deleted) I get to the point of getting this error
/Users/myuser/git/LiveData/LiveData/CSC: Error CS0041: Unexpected error writing debug information -- 'Windows PDB writer is not available -- could not find Microsoft.DiaSymReader.Native.x86.dll' (CS0041) (LiveData)
In a windows machine the same project builds using visual studio targeting mono 4.5.
When I click on the error it tells me that /Users/myuser/git/LiveData/LiveData/CSC doesn't exist
Another thing is that in the folder structure of the solution there's a package folder (not the one inside the project) and inside this one I have a folder called Microsoft.Net.Compilers 1.3.2 that has inside another folder called "tools" that contains among other things csc.exe and the dll thta can't be found.
I have tried to install the dll directly in the project using nuget but even if it was installed the build showed me the same error
Thanks,
As for workaround for now you can just limit usage of Microsoft.Net.Compilers to Release configuration (edit *.csproj file):
<Import Project="..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props" Condition="'$(Configuration)' == 'Release' And Exists('..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props')" />
take a look at beginning of condition:
'$(Configuration)' == 'Release'
This way I can build and debug locally and build my project ie. in appharbor.
Building the project in release configuration should fix it!
This might not be completely related but may be helpful in some ways. Regarding the issue on 'could not find Microsoft.DiaSymReader.Native.x86.dll', have a look at this issue on GitHub: https://github.com/dotnet/cli/issues/3016
It seems like the solution is either:
Dependency to Microsoft.NETCore.Platforms needed for RID graph which
was missing. Any package which has transitive dependency on it (like
NETStandard.Library) could also make things work.
Adding dependency to "Microsoft.NETCore.Platforms": "1.0.1-" or
"NETStandard.Library":"1.5.0-" make it work.
adding Microsoft.NETCore.Platforms works as well

Octopress blog - atom.xml generation - Entity 'ldquo' not defined

I am trying to re-setup an existing Octopress blog to a new PC.
And When I generate pages.
An atom.xml is generated with following content at the first line.
And when I hit the browser I get an error:
This page contains the following errors: error on line 1 at column 28:
Entity 'ldquo' not defined Below is a rendering of the page up to the
first error.
My _config.yml file has this:
subscribe_rss: /atom.xml
subscribe_email:
root: /
permalink: /blog/:year-:month-:day/:title/
source: source
destination: public
plugins: plugins
code_dir: downloads/code
category_dir: blog/categories
markdown: rdiscount
rdiscount:
extensions:
- autolink
- footnotes
- smart
highlighter: pygments
I think I am aware that ' chars are changed to ldquo due to rdiscount smart extension. But If thats the case, I should not be getting the error on browser.
I am confused. Any help would be great.
If I remove 'smart' extension, then the generated atom.xml does not contain the > , due to which it fails again and throws some other error.
Please help
Also raised here:
https://github.com/imathis/octopress/issues/1759
I dont think its your config file.
Try to change the markup engine and see if its still displaying the error.
As i see it the engine replace them and since i cannot see your code its hard to find out the exact problem.
Replace the markdown configuration and test it again.