gorriecoe / silverstripe-menu Goto Github PK
View Code? Open in Web Editor NEWAdds multiple menus that are defined via yml and managed via the cms.
License: BSD 3-Clause "New" or "Revised" License
Adds multiple menus that are defined via yml and managed via the cms.
License: BSD 3-Clause "New" or "Revised" License
Hi Gorrie,
Changing the order of the menu links gives an error, at least in SilverStripe 4.1.2:
[2018-07-03 10:05:10] error-log.ERROR: Uncaught Exception SilverStripe\ORM\Connect\DatabaseException: "Couldn't run query: UPDATE "MenuLink" SET "Sort" = 1, "LastEdited" = '2018-07-03 10:05:10' WHERE "ID" = 1 42S22-1054: Unknown column 'LastEdited' in 'field list'" at /vagrant/www/vendor/silverstripe/framework/src/ORM/Connect/DBConnector.php line 64 {"exception":"[object] (SilverStripe\\ORM\\Connect\\DatabaseException(code: 0): Couldn't run query:\n\nUPDATE \"MenuLink\" SET \"Sort\" = 1, \"LastEdited\" = '2018-07-03 10:05:10'\nWHERE \"ID\" = 1\n\n42S22-1054: Unknown column 'LastEdited' in 'field list' at /vagrant/www/vendor/silverstripe/framework/src/ORM/Connect/DBConnector.php:64)"} []
It's looking for the column LastEdited, but that column doesn't exist in the table MenuLink. I don't know if this is an issue with this module or with gridfieldextensions?
Hi Damian
I reckon Silverstripe 4 have removed ScaffoldingProvider and SchemaScaffolder and also they have updated GraphQL.
I have made a pull request, If you don't mind can you please look into this one as well.
Details:
Uncaught Error: Interface "SilverStripe\GraphQL\Scaffolding\Interfaces\ScaffoldingProvider" not found
Platoform Php 8.1
CMS Version : 4.11.0
Many thanks
Merwin
Please add support for SS 5
In Silverstripe 4.12 (php 8.1) I get an error when I want to open a menuset. This is because $default_sort is set as an array in MenuLink.php line 86.
Changing private static $default_sort = ['Sort' => 'ASC'];
to private static $default_sort = 'Sort';
will solve this.
As $default_sort should not be an array according this issue in gridfieldextensions: symbiote/silverstripe-gridfieldextensions#344
MenuLink extends Link, but if I have another class that extends Link (but is not scaffolded) it will crash graphql.
Eg..
<?php
namespace LittleGiant\Studio\Base\DataObjects;
use gorriecoe\Link\Models\Link;
class CallToAction extends Link {}
All graphql queries now produce Type 'LittleGiantCallToAction' is not a registered GraphQL type
I think you need to shift the graphql scaffolding off the subclass and onto the Link base class to fix it.
Hi,
Great module! Could you explain more about the nested option?
Thanks.
Apply sortable tree field to each menuset admin interface for improved UI.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.