Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Less_Exception_Compiler #497

Closed
ghost opened this issue Sep 16, 2015 · 14 comments
Closed

Less_Exception_Compiler #497

ghost opened this issue Sep 16, 2015 · 14 comments

Comments

@ghost
Copy link

ghost commented Sep 16, 2015

Less_Exception_Compiler thrown with message "variable @text-color is undefined in file /public_html/extensions/likes/less/forum/extension.less in extension.less on line 7, column 12
05| 
06|   a {
07|     color: @text-color;
08|     font-size: 15px;
09|     font-weight: bold;
10|     display: block;"

Stacktrace:
flarum/framework#28 Less_Exception_Compiler in /public_html/flarum/vendor/oyejorge/less.php/lib/Less/Tree/Variable.php:49
flarum/framework#27 Less_Tree_Variable:compile in /public_html/flarum/vendor/oyejorge/less.php/lib/Less/Tree/Expression.php:52
flarum/framework#26 Less_Tree_Expression:compile in /public_html/flarum/vendor/oyejorge/less.php/lib/Less/Tree/Value.php:27
flarum/framework#25 Less_Tree_Value:compile in /public_html/flarum/vendor/oyejorge/less.php/lib/Less/Tree/Rule.php:75
flarum/framework#24 Less_Tree_Rule:compile in /public_html/flarum/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php:94
flarum/framework#23 Less_Tree_Ruleset:compile in /public_html/flarum/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php:94
flarum/framework#22 Less_Tree_Ruleset:compile in /public_html/flarum/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php:94
flarum/framework#21 Less_Tree_Ruleset:compile in /public_html/flarum/vendor/oyejorge/less.php/lib/Less/Parser.php:187
flarum/framework#20 Less_Parser:getCss in /public_html/flarum/vendor/flarum/core/src/Assets/LessCompiler.php:39
flarum/framework#19 Flarum\Assets\LessCompiler:compile in /public_html/flarum/vendor/flarum/core/src/Assets/RevisionCompiler.php:57
flarum/framework#18 Flarum\Assets\RevisionCompiler:getFile in /public_html/flarum/vendor/flarum/core/src/Assets/AssetManager.php:63
flarum/framework#17 Flarum\Assets\AssetManager:getCssFile in /public_html/flarum/vendor/flarum/core/src/Support/ClientView.php:264
flarum/framework#16 Flarum\Support\ClientView:render in /public_html/flarum/vendor/flarum/core/src/Support/HtmlAction.php:28
flarum/framework#15 Flarum\Support\HtmlAction:handle in /public_html/flarum/vendor/flarum/core/src/Forum/ForumServiceProvider.php:140
flarum/framework#14 Flarum\Forum\ForumServiceProvider:Flarum\Forum\{closure} in /public_html/flarum/vendor/flarum/core/src/Http/RouterMiddleware.php:65
flarum/framework#13 Flarum\Http\RouterMiddleware:__invoke in <#unknown>:0
flarum/framework#12 call_user_func in /public_html/flarum/vendor/zendframework/zend-stratigility/src/Dispatch.php:79
flarum/framework#11 Zend\Stratigility\Dispatch:__invoke in /public_html/flarum/vendor/zendframework/zend-stratigility/src/Next.php:113
flarum/framework#10 Zend\Stratigility\Next:__invoke in /public_html/flarum/vendor/flarum/core/src/Api/Middleware/ReadJsonParameters.php:32
flarum/framework#9 Flarum\Api\Middleware\ReadJsonParameters:__invoke in <#unknown>:0
flarum/framework#8 call_user_func in /public_html/flarum/vendor/zendframework/zend-stratigility/src/Dispatch.php:79
flarum/framework#7 Zend\Stratigility\Dispatch:__invoke in /public_html/flarum/vendor/zendframework/zend-stratigility/src/Next.php:113
flarum/framework#6 Zend\Stratigility\Next:__invoke in /public_html/flarum/vendor/flarum/core/src/Forum/Middleware/LoginWithCookie.php:47
flarum/framework#5 Flarum\Forum\Middleware\LoginWithCookie:__invoke in <#unknown>:0
flarum/framework#4 call_user_func in /public_html/flarum/vendor/zendframework/zend-stratigility/src/Dispatch.php:79
flarum/framework#3 Zend\Stratigility\Dispatch:__invoke in /public_html/flarum/vendor/zendframework/zend-stratigility/src/Next.php:113
flarum/framework#2 Zend\Stratigility\Next:__invoke in /public_html/flarum/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php:75
flarum/framework#1 Zend\Stratigility\MiddlewarePipe:__invoke in /public_html/flarum/vendor/zendframework/zend-diactoros/src/Server.php:166
#0 Zend\Diactoros\Server:listen in /public_html/index.php:60
@ghost
Copy link
Author

ghost commented Sep 16, 2015

You can see the whole thing at (there is a lot more and it's easier to read there)

https://sociallyuncensored.com/index.php

@tobyzerner
Copy link
Contributor

What is the content of /home/sociallyuncensor/public_html/flarum/vendor/flarum/core/less/lib/variables.less?

@ghost
Copy link
Author

ghost commented Sep 16, 2015

In addition in error_log these two lines keep repeating over and over (see below).... Follow up on your question in my next post.

PHP Notice: Undefined variable: driver in /public_html/flarum/vendor/illuminate/support/Manager.php on line 84

PHP Warning: Missing argument 1 for Illuminate\Support\Manager::createDriver(), called in /public_html/flarum/vendor/illuminate/support/Manager.php on line 87 and defined in /public_html/flarum/vendor/illuminate/support/Manager.php on line 77

@ghost
Copy link
Author

ghost commented Sep 16, 2015

variables.less contents:

// ---------------------------------
// CONFIG

@config-primary-color:             #536F90;
@config-secondary-color:           #536F90;
@config-dark-mode:                 false;
@config-colored-header:            false;

// ---------------------------------
// COLORS

@primary-hue:                      hue(@primary-color);
@primary-sat:                      saturation(@primary-color);

@secondary-hue:                    hue(@secondary-color);
@secondary-sat:                    saturation(@secondary-color);

// Derive the primary/secondary colors from the config variables. In dark mode,
// we make the user-set colors a bit darker, otherwise they will stand out too
// much.
.define-colors(@config-dark-mode);
.define-colors(false) {
  @primary-color:                  @config-primary-color;
  @secondary-color:                @config-secondary-color;

  @body-bg:                        #fff;
  @text-color:                     flarum/framework#111;
  @link-color:                     saturate(@primary-color, 10%);
  @heading-color:                  @text-color;
  @muted-color:                    hsl(@secondary-hue, min(25%, @secondary-sat), 55%);
  @muted-more-color:               #aaa;
  @shadow-color:                   rgba(0, 0, 0, 0.35);

  @control-bg:                     hsl(@secondary-hue, min(50%, @secondary-sat), 93%);
  @control-color:                  @muted-color;
  @control-danger-bg:              #fdd;
  @control-danger-color:           #d66;

  @overlay-bg:                     fade(@secondary-color, 90%);
}
.define-colors(true) {
  @primary-color:                  @config-primary-color;
  @secondary-color:                @config-secondary-color;

  @body-bg:                        hsl(@secondary-hue, min(20%, @secondary-sat), 10%);
  @text-color:                     #ccc;
  @link-color:                     saturate(@primary-color, 10%);
  @heading-color:                  @text-color;
  @muted-color:                    hsl(@secondary-hue, min(20%, @secondary-sat), 35%);
  @muted-more-color:               hsl(@secondary-hue, min(10%, @secondary-sat), 25%);
  @shadow-color:                   rgba(0, 0, 0, 0.5);

  @control-bg:                     hsl(@secondary-hue, min(20%, @secondary-sat), 13%);
  @control-color:                  @muted-color;
  @control-danger-bg:              flarum/framework#411;
  @control-danger-color:           #a88;

  @overlay-bg:                     fade(darken(@body-bg, 5%), 90%);
}

@hero-bg:                          @control-bg;
@hero-color:                       @control-color;
@hero-muted-color:                 @control-color;

@alert-bg:                         #fff2ae;
@alert-color:                      #ad6c00;

@alert-error-bg:                   #d83e3e;
@alert-error-color:                #fff;

@alert-success-bg:                 #B4F1AF;
@alert-success-color:              #33722D;

.define-header(@config-colored-header);
.define-header(false) {
  @header-bg:                      @body-bg;
  @header-color:                   @primary-color;
  @header-control-bg:              @control-bg;
  @header-control-color:           @control-color;
}
.define-header(true) {
  @header-bg:                      @primary-color;
  @header-color:                   @body-bg;
  @header-control-bg:              fade(#000, 10%);
  @header-control-color:           @body-bg;
}

// ---------------------------------
// LAYOUT

@drawer-width:                     270px;
@pane-width:                       400px;
@header-height:                    52px;
@header-height-phone:              46px;

@border-radius:                    4px;

@zindex-dropdown:                  1000;
@zindex-header:                    1010;
@zindex-composer:                  1020;
@zindex-pane:                      1030;
@zindex-modal-background:          1040;
@zindex-modal:                     1050;
@zindex-alerts:                    1060;
@zindex-tooltip:                   1070;

// ---------------------------------
// BREAKPOINTS

@screen-phone-max:                 (@screen-tablet - 1);

@screen-tablet:                    768px;
@screen-tablet-max:                (@screen-desktop - 1);

@screen-desktop:                   992px;
@screen-desktop-max:               (@screen-desktop-hd - 1);

@screen-desktop-hd:                1100px;

@phone:                            ~"(max-width: @{screen-phone-max})";
@tablet:                           ~"(min-width: @{screen-tablet}) and (max-width: @{screen-tablet-max})";
@desktop:                          ~"(min-width: @{screen-desktop}) and (max-width: @{screen-desktop-max})";
@desktop-hd:                       ~"(min-width: @{screen-desktop-hd})";

@tablet-up:                        ~"(min-width: @{screen-tablet})";
@desktop-up:                       ~"(min-width: @{screen-desktop})";

// ---------------------------------
// COMPONENTS

@tooltip-bg:                       rgba(0, 0, 0, 0.9);
@tooltip-color:                    #fff;

@online-user-circle-color:         #7FBA00;

@ghost
Copy link
Author

ghost commented Sep 16, 2015

Also in error_log

PHP Warning: Invalid argument supplied for foreach() in

/public_html/flarum/vendor/flarum/core/src/Support/ExtensionsServiceProvider.php on line 28

@tobyzerner
Copy link
Contributor

Can you try a fresh install? Sounds like your installation is bonked somehow...

@ghost
Copy link
Author

ghost commented Sep 16, 2015

I can.

@tobyzerner
Copy link
Contributor

Also, in the future, when posting debug output, please wrap it in triple backticks (```). Otherwise, your issue ends up referencing a whole lot of other issue numbers (#XX).

@ghost
Copy link
Author

ghost commented Sep 16, 2015

The more I know.... Thanks for the tip

@ghost
Copy link
Author

ghost commented Sep 16, 2015

Well this is going to be fun to debug

index.php/assets/forum-DjLn34BbWV1vTvcI.css
index.php/assets/forum-XmulSCVpYqMdWibC.js
index.php/assets/forum-en-4tJNc0XHEgAyldi7.js

I have no idea how a JS file or a simple CSS could give such an error.

screenshot_20150916_041213

@tobyzerner
Copy link
Contributor

Looks like your base URL incorrectly has index.php in it. Try editing that part out in config.php, as well as the trailing slash.

@tobyzerner
Copy link
Contributor

FYI, Flarum does not work without URL rewriting at the moment. We'll be working on that soon: flarum/issue-archive#390

@ghost
Copy link
Author

ghost commented Sep 16, 2015

Config had this

'url' => 'https://sociallyuncensored.com/index.php',

So I removed the /index.php in it

URL rewrite is indeed turned ON.

@ghost
Copy link
Author

ghost commented Sep 16, 2015

IT WORKS !!! :)

(so long as you leave out index.php)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant