Magento 2 : _module.less not being included from custom theme - magento2

I have created a custom theme (basically a copy of Luma) and am not seeing the _module.less from the module overrides appear in the CSS. I know the module override is working because I can see the template updates, but I don't see CSS/Less updates. I have tried using the grunt tool to compile Less but that has no effect.
I can see my changes in the less files in my theme under pub/static/frontend/ but the compiled css does not contain my changes.
It's probably something stupid but any help is appreciated. I am on Magento 2.1

Looks like it was due to a node module. Deleting the modules and reinstalling fixed the issue. I also cleared my npm cache just to be sure.

Related

Multiple _PublishedWebsites Folders

I am using VS Code on Manjaro and have setup a solution with 2 projects, a webapp and a test project.
Each time I do a build it appears to generate a new _PublishedWebsites folder with NetCoreApp underneath it. I am surprised that nobody else seems to have encountered this issue. Can anyone tell me why this is happening and how to fix it?
Many thanks.
You should check your csproj file, particularly PublishDir element which is your specified location for publishing output files and change that if your like.
However, I think this is required behavior for .net core support in app harbor, find more details in the support webpage over here.

Custom Extension Adjustment to 6.2

I currently got the task to upgrade a custom made CRM extension named "kbs". It was developed on TYPO3 4.7 and using old namespaces in its classes like "Tx_Kbs_Service_TestService" etc.
I want to upgrade this whole extension to be able to work properly with our current backend version of 6.2. More specifically i want to be able to use the extension builder to make changes to this extension which i am currently not able to do on the 6.2 TYPO3 backend. It is not even an option to select the "kbs" extension in the extension builder.
Of course i reasearched the web but I find it very difficult to find information what you have to do in order to addapt a custom extension.
So far I assume that i will have to change all the namespaces in all my classes manually and maybe watch out for decrecated classes. But I do not really know if that is the way to go.
Does anyone have and guidelines, links or tipps for me? I would really appreciate it!
Thanks in advance,
Simon
To the first question:
In extension_builder only extensions are changeable, they had their original configuration made by extension_builder.
Extension builder itself is only an option to use, and there were also other options to kickstart an extension.
Update:
This is true, that extension builder is not an "editor" for extensions but a tool to help kickstarting an extension.
If I would get the task and extension_builder would be available I would not use it to make changes on the code. It is not 100% sure, that manually changes were not made on the code after its last automatically generated version. And if dummy actions were changed and properly excluded from the config they could be also deleted.
I think your best choice to change the things manually.
There are two source to read first:
TYPO3 6.2 Release Notes.
What's new presentation (TYPO3 6.2)
They contains breaking changes and some example.
If you do not change the PHP version, than changing the Namespaces and some deprecated functions. (The sources above could help to get an idea on those)
One tricky part could be to migrate old image logic into the "new" FAL (File Abstraction Layer). If you don't need to deal with images, then it must be an easier thing to go with.
There is also an extension to help with some migration stuff: smoothmigration.
You can find some hints in this presentation also:
jweiland: Smooth Migration TYPO3 4.5 > 6.2 LTS

Migrating wicket 1.4 to 1.5 with customized js resource mounts

we are still on wicket 1.4, which is pretty much EOL.
I'm not an expert with Wicket and this is 5 year old code with parts from the SVN history missing due to branch restructuring, uncommented JIRA tasks for the changes and the original dev long gone.
I've started to look into migration to 1.5 and stumpled across the fact that this project uses patched JS like wicket-event.js, wicket-ajax.js. Additionally, it seems as someone manually added jquery libraries to have them minified and merged and updated manually in the project.
The mounts look like mountSharedResource("/js/wicket-event.js", new ResourceReference(WicketEventReference.class, "wicket-event.js").getSharedResourceKey());
I'm not really sure what to make of that.
The following questions arise:
Any input or follow-up questions on this scenario is very much appreciated. What are your thoughts?
How do I cope with those resource mounts? It is unclear why we have them in the first place, maybe only for the minifying? How does wicket find it's JS resources in the first place?
If I find that a patched JS resource makes sense, like patching it to attach custom classes to elements or add options for dropdown elements. How would I solve this now? Patch again? Use other means to achieve this?
EDIT: this is not only for JS resources, but also for CSS resources. It seems, that most mounts are really only done because we do that minification.
I'd recommend to remove all those custom mounts. This may break your app if you have customizations in wicket-xyz.js but it will most probably not work due to such custom modifications too. The best way for such custom modifications is to use monkey patching.
Once you see that your application works with Wicket 1.5 I'd recommend to upgrade to latest 6.x. Wicket 6.x has a lot of improvements in the management of resources - e.g. it will load some.js in DEV mode and some.min.js in PROD mode automatically.
See http://wicketinaction.com/2012/07/wicket-6-resource-management/ and http://wicketinaction.com/2012/07/wicket-6-javascript-improvements/ for more details.

Why can't I find the default Magento theme being loaded?

Should be pretty simple. I am trying to find what theme is being loaded in Magento to create my own custom theme. The problem is the mine (ver. 1.7.0.2) has no files in the frontend->default->default folder so I can't put any print statements there or see which template Magento is loading to learn more about it. Print statements in base->default don't seem to work either.
And where is the home page template located?
I don't know why Magento makes this so hard or maybe I'm just looking at old info that's not applicable anymore.
Turn on template path hints. Also disable the cache from System > Cache Management while you are doing any theme work.
+1 for other answer suggesting you turn on template path hints. That is a great way to figure out the structure of how things work in Magento.
I would also recommend the user guide. It's been updated to apply to 1.7. You used to have to pay for the guide but they make it available for free now.
http://www.magentocommerce.com/resources/magento-user-guide
As well as the latest designers guide that has info specific for templates etc.
http://www.magentocommerce.com/design_guide

how do I modify org.eclipse.ui.workbench plugin

I want my application shaped changed by modifying org.eclipse.ui.workbench plugin.
but the problem is even though I import it with source , it is not operated.
How do I solve this out?
It looks like importing a plugin from source leaves the *.properties files behind. They are required, however; and must be copied manually in order for the plugin to be functional.
Don't do that :-)
Two reasons:
(1) as soon as you switch to a newer version of Eclipse, your code won't work. You have to merge all the changes that had gone into workbench plugin
(2) By modifying the code and not submitting the changes back, you are violating EPL. (I'm not a lawyer, so check with a real lawyer for more details)