Small changes disrupt Less calls
Permalink 1 user found helpful
Was "I don't know where to begin with this error message"
Modifying the Stucco theme. Created a preset that works, added content areas where I need them. But now I can't add a page!
Here's what I get:
Argument 1 passed to Concrete\Core\Page\Type\Type::createDraft() must be an instance of Concrete\Core\Page\Template, null given, called in /home/yfsneals/public_html/concrete/controllers/backend/page.php on line 37 and defined
Unfortunately, I'm a journalist by training. I speak code only through the help of W3schools and the like.
Any help would be appreciated.
http://www.mileditors.com
Modifying the Stucco theme. Created a preset that works, added content areas where I need them. But now I can't add a page!
Here's what I get:
Argument 1 passed to Concrete\Core\Page\Type\Type::createDraft() must be an instance of Concrete\Core\Page\Template, null given, called in /home/yfsneals/public_html/concrete/controllers/backend/page.php on line 37 and defined
Unfortunately, I'm a journalist by training. I speak code only through the help of W3schools and the like.
Any help would be appreciated.
http://www.mileditors.com
I installed your theme and my problem was way worth than yours. The site would not load at all.
What was creating the problem is... wait for it...
theme\stucco\css\build\common.less
around line 231 you have
The part that is creating the issue is
if you replace @{heading-types-dot-color} with a color (#000 for black for instance), the problem disappears.
Less is often very annoying and this is one of those situations. To solve it, you have to rename that variable to something else. And the weird thing is I had to try several names before it worked. For instance, heading-dot-color also didn't work but headinz-dot-color (notice the z) worked. headinz-types-dot-color on the other hand also didn't work.
In the en,d I tried h-dot-color which worked.
So now your code looks like this (notice the variable for the fill value):
And not far below that you have this line
that should become
After that, when the site was finally loading, I was able to add pages without a glitch.
What was creating the problem is... wait for it...
theme\stucco\css\build\common.less
around line 231 you have
background: url('data:image/svg+xml;utf8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="8px" viewBox="0 0 12 8" enable-background="new 0 0 12 8" xml:space="preserve"><circle cx="6" cy="4" r="3" fill="@{heading-types-dot-color}" ></circle></svg>') center bottom repeat-x;
The part that is creating the issue is
fill="@{heading-types-dot-color}"
if you replace @{heading-types-dot-color} with a color (#000 for black for instance), the problem disappears.
Less is often very annoying and this is one of those situations. To solve it, you have to rename that variable to something else. And the weird thing is I had to try several names before it worked. For instance, heading-dot-color also didn't work but headinz-dot-color (notice the z) worked. headinz-types-dot-color on the other hand also didn't work.
In the en,d I tried h-dot-color which worked.
So now your code looks like this (notice the variable for the fill value):
background: url('data:image/svg+xml;utf8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="12px" height="8px" viewBox="0 0 12 8" enable-background="new 0 0 12 8" xml:space="preserve"><circle cx="6" cy="4" r="3" fill="@{h-dot-color}" ></circle></svg>') center bottom repeat-x;
And not far below that you have this line
@heading-types-dot-color: lighten(@page-heading-types-color, 50%);
that should become
@h-dot-color: lighten(@page-heading-types-color, 50%);
After that, when the site was finally loading, I was able to add pages without a glitch.
I renamed the thread to make it easier to find. Appropriate?
Wow...I didn't know Less was so sensitive. I think I did some color adjustments to that file, but I don't remember touching that line at all. Everything worked until I tried to make a page.
I really appreciate not only the answer but also the clarity of the explanation.
I really appreciate not only the answer but also the clarity of the explanation.
You're welcome. I was surprised as well. I didn't try to push it to figure out what that variable name was causing problem but it does make LESS look pretty touchy
You can send me your modified theme by PM if you want. I'll have a look.
It looks like, for some reason, the default template for the page type is not set.