Closed fabianwurk closed 3 years ago
Should your $views
be set to just partials.header
?
Have added an extra folder level to segment and manage the partials a bit easier .......
so it looks like it'd be partials.header.header
in your current error screenshot? unless you use $upper
inside of upper.blade.php
and then @include
it in your header.
Yeah, that was it Brandon. I should've have spotted that π. Many thanks π
Sorry, back again π .... I had went and set up all the navs, and I needed to change theme name for repo. When I went back in and restested all, I'm getting errors as per attached depending if I use:
protected static $views = [
'partials.header.header',
];
or
protected static $views = [
'partials.header.header.nav',
];
Here is current file structure ...
I've tried many other combinations but all throwing various errors each time.
Any suggestions on where it could be going wrong?
Thanks
Repo here if it helps for referencing:
so it should be $views = ['partials.header.nav.upper']
I think?
Yeah, had actually tried that too earlier but no joy ...
that means its working. your menu is just empty. theres a PR open to fix this from throwing an exception
Sorry, confused on this.
The nav is assigned ....
but even if I try var dumping the array it just returns error ....
I've also changed the file from the PR. It does sort the error, but it's still returning null from var dump of array ...
Repo updated for ref: https://github.com/fabianwurk/atomic-jit
@Log1x I've now tested so many configurations of this, and still not working. Also tested this on bare bones fresh install of latest Sage 10 repo. Seems to be an issue where if you change the name of the nav, or add any additional navs, it then fails to show nav. Can you please test this your side to see if you are experiencing same issue? Thanks.
looking into it β not entirely sure what's happening but seems to be an issue with Acorn perhaps. could you try wp acorn optimize:clear
(or yarn clean
) after changing everything?
I tried wp acorn optimize:clear
, but no difference unfortunately. FYI ... Works fine with earlier sage 10 branch as I've tested same setup on it so must be some issue with that latest version.
unfortunately I wasn't who did a bulk of the changes in the current master of acorn right now and I've been a little swamped with work β so I'm not entirely sure what got broke and where yet. I know it's not a problem with Navi in particular though but Composers as a whole.
your config/view.php
or whatever is up to date with the latest master branch of Sage 10? try enabling globals
in config/app.php
and see if that makes a difference?
Yeah no worries at all. Not a major issue as happy to use earlier version of Sage 10 without Tailwind JIT. Thanks for taking a look anywayπ
looking into it β not entirely sure what's happening but seems to be an issue with Acorn perhaps. could you try
wp acorn optimize:clear
(oryarn clean
) after changing everything?
This fixed my very similar issue! YAY.
Hi Brandon,
I've just installed latest Sage 10 release, and attempting to add back in various navs.
Unfortunately, I'm getting a weird 'Undefined variable' error:
Heres what I have stripped back to just one nav:
Composers > Navigation.php:
then in header.blade.php:
I've tested the same setup on an older version of Sage 10 and it works as expected.
Any idea why this may be happening on newest release (but I could be doing something stupid π)?
Here is error screen attached.
Thanks