Magento2 parent-child theme configuration and deployment issues - configuration

Having issues with site themes.
I have a parent theme and a child theme. Several files/layouts are overriden in the child theme.
This was all working fine up until yesterday or the day before (been working on a module, so only noticed the issue today).
The child theme static files are not being generated...only the requirejs-config.js file.
The parent theme static files are created fine.
If i switch to a default Magento theme (luma) for the store...keeping the parent theme set globally, i get the same result. The luma files only contain the JS file mentioned above.
If i change the global theme to luma, the old parent theme static files are still generated, and once again...only a JS file in the luma static files. (Why is it still generating the old parent theme static files, if it is not set for any website/store?)
- im in developer mode
- no themes in DB have the virtual setting (all are 0)
- All the right theme files are in place...this theme has been around for a while. its not brand new.
- i downloaded a fresh DB copy from the staging site (which is working fine) to ensure this wasnt an issue with data in my local DB
- Switched GIT branches to ensure none of my latest work had caused an issue
- There are 2 system configs for theme_id (global/websites). These are both set to theme id 2 at the moment (luma)
- All the usual CLI commands are being run each time i change something trying to figure this out. Its not a cache clean/flush/upgrade command running issue.
Questions:
1. How is it detecting and deploying the parent theme files...when all website/stores are set to luma theme?
2. Why aren't theme files no longer being deployed to pub/static...except the old parent theme files (even though i am in developer mode, and files don't need deploying....some files are always deployed, its not me running deployment commands)
3. What could possibly be involved in causing this issue, except the areas i mention above that ive been playing with?

Related

PhpStorm set all files / folders to brown background and weird structure

So I just noticed that my PhpStorm has set a background color to my project and also the structure is weird. All best explained by some screenshots.
This is how it is looking now, I cannot even see my App folder etc here:
After I click on Project in the top and then select Project Files, I can see my structure again like normal:
My question is, what does this mean and how can I set it "back to normal"? As for me, "normal" means the following:
I can see all my files in Project and also there is no brown background color.
What I have done so far, as suggested from Google searches, is:
Close the project, remove it from recent projects and opening it again in PhpStorm.
Removing the .idea folder and opening my project again.
Reload All From Disk.
Invalidate Caches.
P.S. This is a new Laravel project, with only some minor changes and all files added to git, and also just did one last commit. Nothing "fixes" this.
This "yellowish" background means that the IDE treats those files/folders as excluded or not part of the project (i.e. outside of the project). This can be caused by some broken/out-of-sync project config file (for whatever reason, e.g. when making a project and there is incomplete .idea folder already / merge conflict etc).
Deleting .idea subfolder while IDE is closed and then reopening the project is enough to fix it (use "Open" and point to the project root folder and PhpStorm will make a new project from existing files).
Related forum thread/tickets:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/4404912351506/comments/4404921897746
https://youtrack.jetbrains.com/issue/IDEA-271728
https://youtrack.jetbrains.com/issue/IDEA-296960

Why is Live Sass Compiler breaking my many-to-one source mappings?

Goal
Compile many .sass files to one .css file, where all .sass and .css files are in the same directory.
Problem summary
I'm trying to compile many .sass files to one .css file, all located within the same directory, like this:
- app
- static
- css
- _base.sass
- _header.sass
- _layout.sass
- _map.sass
- _modal.sass
- _windows.sass
- main.v0.css
- main.v0.css.map
- main.v0.sass
I'm using the VSCode extension Live Sass Compiler, which has worked seamlessly in the past for what I'm doing but all of a sudden it's breaking my source mappings. I also can't remember/figure out how to do a many to one Sass compilation at the command line, with the specific constraint of keeping both the .sass and .css files in the same directory.
At this stage, every time I use Live Sass Compiler to compile, my git history shows these changes (see screenshots), which seem to be breaking the site. When I load my page after making changes in this way, all the styling for my site stops working.
Findings
From what I can deduce, it's wiping all the previously compiled styling from main.v0.css and replacing it with mapping information. In main.v0.css.map it seems to be stripping sourceRoot information, changing sources from main.v0.css to main.v0.sass, and changing file from main.v0.css to main.v0.sass (so just switching those two for some reason).
Can anyone help me? Maybe this broke with the last VSCode update or something?

PhpStorm: multiple projects with common core

Due to security reasons, I have to split one project to divisions (client, admin, ...), and deploy them to different web servers. These divisions have one common script base, but each division has its own functions. As an IDE I use PhpStorm.
The question: what is the best way to organize project's structure and settings, so the common core part will be visible for IDE indexing in all project's divisions, but at the same time, being maintained from a single project (perhaps, standalone)?
In Java you can do lib jar files for further linking in various projects.
But how it can be done in PHP?
There are multiple ways of how to reference extra PHP code in a project.
If you plan to actively edit such extra code in the same project (and want to see their TODOs, code inspection warnings, include references in code refactoring etc):
You can just add it as an additional Content Root: Settings/Preferences | Directories. Folder added this way will be treated as a part of the project itself and will be shown as a separate node in the Project View panel (just as the main code, which is a Content Root as well).
Or you can open 2nd project while 1st one is already opened and when asked, just chose "Attach":
It's not going to be full 2 projects in one frame, more like something in between attaching Content Root and having 2 projects opened in separate frames.
https://www.jetbrains.com/help/phpstorm/opening-multiple-projects.html
Simple symlink will also do the job (but you need to place it somewhere in a project, e.g. PROJECT_ROOT/libs/my_symlinked_code). You then will need to provide a path mapping for that folder for debugger (if you will debug it of course) as PHP/Xdebug works with "final/resolved path" while IDE works with the path as is.
If you do not need to actively edit that extra code in the same window (and ignore any TODOs, code inspection warnings and other inspection results etc):
Do it as a composer package then? Composer can use custom sources (e.g. GitHub repo or a folder on a local filesystem).
Just add the path to that folder as a "Include Path" at Settings/Preferences | Languages & Frameworks | PHP --> Include Path tab. Code referenced this way is meant for 3rd party libraries (the code that you just use but not edit, e.g. framework code, your send mail/ORM library etc). Composer packages will also be included here by default.
https://www.jetbrains.com/help/phpstorm/php.html#include-path-tab

Magento 2 - changing core code css/html not reflecting in front end

I installed Magento 2 - Luma theme using XAMPP.
When I try to change one heading for example, from Admin Panel - everything is working.It displays changed heading in the front end correctly.
When I try do the same from core code - it's not working.
I save everything in core core when change something. Delete cache.Change browsers - none of these working.
If you really want to reflect the changes in css/html on run time, you have to change in pub/static/front end/magento/theme/css contents, then you can check the result on front end, if you are doing the changes in code folder you have to clean/flush the cache, still you are not seeing the result, just run the deployment command. everything will be working fine.
You have to to use Flush JavaScript/CSS Cache
and Flush Static Files Cache

Create versioned documentation archive

I am in the process of rebuilding a API documentation site for an open source project where we want to keep an archive of previous releases. I am wondering how I can configure Jekyll to generate the right hierarchy?
We have the following directory layout in our current /docs folder (which we would like to reuse in Jekyll somehow):
current/
v1/
v2/
v3/
Whenever we release a new version the current folder gets copied to a new folder (say v4). The contents of each folder is something like this:
introduction.md
testing.md
api-foo.md
api-bar.md
I'd like these to be available under the url domain.com/v3/testing/, domain.com/current/testing/, etc. I see that I could probably employ collections to do this, having one collection per version. To do this I see myself auto-updating the _config.yml as part of a build script (I made an example doing this here), but I am not sure how to progress from here, or if using collections for this is the wrong approach ...
This is too brief of an update to be of real quality, but thought I would mention that we solved this in the end in the Sinon project. Check out the repo at GitHub sinonjs/sinon and see the docs folder as well as the scripts called from package.json.
Feel free to improve on this answer by editing it and adding content and links.