RhymeDigital / contao_zurb_foundation

A set of tools for Contao Open Source CMS to utilize the Foundation responsive framework.
GNU Lesser General Public License v3.0
1 stars 1 forks source link

Error Undefined variable $gutters: line: 83 #20

Closed jedoCodes closed 5 years ago

jedoCodes commented 5 years ago

I get the following error: Undefined variable $gutters: line: 83

I use: Contao 4.7.1 php 7.3.1 contao_zurb_foundation: dev-dev_foundation6 zurb/Foundation: 6.4. or 6.5. leafo/scssphp: 0.7.7

blairwinans commented 5 years ago

@jedoStyle Thanks for reporting the issue. This is likely because some SCSS vars are not loading correctly. Can you tell me which components you have selected in your Theme settings so I can reproduce/diagnose?

jedoCodes commented 5 years ago

I have selected everything except "prototype / prototype" and you must change the path of foundation-normalize. It was moved to scss/vendor.

blairwinans commented 5 years ago

@jedoStyle I pushed those changes but I think the overall issue is something with the load order of the components. Can you try reordering the components in the Themes section to put the non-component classes up top, namely grid/grid andf xy-grid/xy-grid? I think that may help, but let me know if it does not. Also, which file in the stacktrace is reporting the error on Line 83?

jedoCodes commented 5 years ago

I have the follow load order of the components:

grid/grid xy-grid/xy-grid typography/typography forms/forms components/visibility components/float components/button components/button-group components/accordion-menu components/accordion components/badge components/breadcrumbs components/callout components/card components/close-button components/drilldown components/menu components/dropdown-menu components/dropdown components/flex components/responsive-embed components/label components/media-object components/menu-icon components/off-canvas components/orbit components/pagination components/progress-bar components/reveal components/slider components/sticky components/switch components/table components/tabs components/title-bar components/top-bar components/thumbnail components/tooltip prototype/prototype

The problem with the $gutters variable seems to come from the component "grid / grid". The error message also comes when I activate only this component.

I think it is a problem of the compiler. I can not understand it because I do not get a created css file.

blairwinans commented 5 years ago

@jedoStyle FYI, still trying to track this down but work has been very busy this week.

Are you using the XY Grid as well? I think the conflict may be that you cannot use both at the same time—you have to choose one or the other. Can you see if that makes a difference? If so, I will know more precisely what to patch.

jedoCodes commented 5 years ago

If I only use grid / grid and no other component of the framework, even then the error comes. This would have to come when compiling the grid / grid component. XY grid without grid / grid will not work.

blairwinans commented 5 years ago

@jedoStyle So this was an error in the leafo/scssphp package all along, which I had documented the fix for in the README file. However, to make it composer-friendly, I added in a composer-patching script and patch-file to the composer installation. You will need to add the extra line to your root composer.json root file as mentioned in the new README.

Let me know if that fixes things but in my tests here it works great with the new changes and the patch file with a fresh composer install.

jedoCodes commented 5 years ago

In my test environment, it still does not work, the error is still the same. I have also adapted the composer.json in the root of my installation, but this does not bring success.

I use: Contao 4.7.4 (without contao-manager) php 7.3.3 contao_zurb_foundation: dev-dev_foundation6 (directly from github) zurb/Foundation: 6.5.* leafo/scssphp: 0.7.7

Undefined variable $gutters: line: 83

Screenshot at Apr 19 10-19-56

jedoCodes commented 5 years ago

when i use the contao manage_edition, then you patch is working. Can you make the patch work without the contao-manager? nice work thanx

blairwinans commented 5 years ago

@jedoStyle In that case you may need to add the patch file to your root composer.json? Can you see if that makes a difference?

"cweagans/composer-patches": "~1.6"

"patches": { "leafo/scssphp": { "Comment out $nextIsRoot to fix Foundation compilation errors": "https://gist.githubusercontent.com/blairwinans/37a124511cbea7597e3a189cc6a27552/raw/0e0929de0e79f5b29528597ca020118291d9a613/scssphp.nextisRoot.patch" }

Screen Shot 2019-04-19 at 9 55 04 AM

jedoCodes commented 5 years ago

Nice it's work fine :) Thanx