Coder Social home page Coder Social logo

isobar-nz / silverstripe-catalogmanager Goto Github PK

View Code? Open in Web Editor NEW
36.0 36.0 26.0 196 KB

Catalog administration via a LeftAndMain like interface. Lets you create and edit pages outside of the site tree

PHP 100.00%
administration cms-extension silverstripe sitetree

silverstripe-catalogmanager's People

Contributors

bummzack avatar hailwood avatar hchokshi avatar rhym avatar stevie-mayhew avatar tom-alexander avatar tractorcow avatar wernerkrauss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

silverstripe-catalogmanager's Issues

Not showing

Hi,
i installed this addon with composer and added the followiong to /mysite/_config/config.yml:

CatalogPage:
  extensions:
    - CatalogPageExtension
  parentClass: 'CatalogParentPage'

No new Tab is shown after rebuilt and flush ? any idea?

No Settings or History tabs

When editing a page via the modeladmin it doesn't display the standard Content, Settings and History tabs that appear when editing a page within the sitetree.
Is there a setting that can be enabled to display these or is there a template removing these from displaying?

Thanks

Parentpage dropdown: possibility to overwrite ID->Title map

in my case i have some "holder" pages for a period, then some "category pages" (which are the ParentPage for the catalogpages) and project pages, which i want to manage using cataolgmanager.

Unfortunately every period has pretty much the same categories.

Now i have the dropdown like

Category 1
Category 1
Category 2

If we can refactor the getter for the Dropdown i could make something like

Period1 > Category 1
Period2 > Category 1
Period2 > Category 2

CMS5 Compatibility

Hi,

I'm trying to get this module compatible for CMS 5.1 but I experiencing an error when I am entering the backend and viewing the SiteTree.

Can someone help me with that? Or better: can you release a version which is compatible with CMS 5.1

Thanks in advance.

Here is the error-message:

[Emergency] Uncaught ArgumentCountError: Too few arguments to function LittleGiant\CatalogManager\Extensions\CategoryPageHierarchyExtension::augmentAllChildrenIncludingDeleted(), 1 passed in /Volumes/projects/myproject/vendor/silverstripe/framework/src/Core/Extension.php on line 140 and exactly 2 expected
GET /admin/pages/treeview
Line 23 in /Volumes/projects/myproject/vendor/littlegiant/silverstripe-catalogmanager/src/Extensions/CategoryPageHierarchyExtension.php

Source
14  */
15 class CategoryPageHierarchyExtension extends DataExtension
16 {
17     private $excludedSiteTreeClassNames = null;
18 
19     /**
20      * @param \SilverStripe\ORM\DataList $stageChildren
21      * @param $context
22      */
23     public function augmentAllChildrenIncludingDeleted(&$stageChildren, &$context)
24     {
25         if ($this->shouldFilter() && $this->owner->hasExtension(HidePageChildrenExtension::class)) {
26             $stageChildren = $stageChildren->exclude('ClassName', $this->getExcludedSiteTreeClassNames());
27         }
28     }
29 

[Enhancment] Allow non-IND sort columns

Allow the ModelAdmin to sort entries by oterh field when CustomSort is disabled. That way page/records coudl be sorted by Title, Created, or any Field on the DataObject

Provide a Changelog

As the version number rises please provide a changelog with all changes, most importantly the incompatible / breaking ones.

I'd like to know if i can update my project without problems.

And that helpful guy will give you some more modules score ;)

composer issue with requirements

When having the latest sortablegridfield 0.5.x installed i cannot install catalogmanager, cause it wants a 0.4.x of sortablegridfield.

any save chance to get the composer.json modified to allow anything greater 0.4 and below 1.0?

~0.4.0 is just below 0.5 (as we're still requiring a 0.x...)

Possibility to hide ParentID dropdown

If i wanted to decide the Parent of my page using some dropdowns (e.g. category, subcategory) and calculate the ParentID onBeforeWrite i need a possibility to disable the ParentID field CatalogPageExtension is providing.

Should be defined in config yml when extending the pagetype. Of course the i have then the full responsibility of creating the right ParentID.

i18n

We should translate the buttons and enabled yes/no. I don't know if transifex is needed, though it's quite easy to set up. I can make a PR, maybe after the code cleanup?

Import and Export

Found that I wasn't able to import/export by CSV without having to replace a function, I have made a pull request for this, as I feel this should be default functionality. But I could be wrong.

#69

Thanks

TranslatableCatalogExtension - LanguageForm action is not allowed

I've added the TranslatableCatalogExtension to my modeladmin, which then shows a language select dropdown in my modeladmin area. When I try to use it to select a language, it throws the following error:
Action 'LangForm' isn't available on class ProductsAdmin.

ru.yml

[User Error] Uncaught Zend_Translate_Exception: Locale "ru" not found in file /home/c/cx40698/grr.tmweb.ru/public_html/betterbuttons/lang/ru.yml

No defined parentClass gives error

When the parentClass is not set in config, an error is raised
77 throw new Exception('Parent class ' . implode(',', $parentClass) . ' does not exist.');

Ss this a bug or how do i create new pages in the root?

Nested CatalogPages

I have the following two catalog pages

  • Artwork
  • Artist

I'd love to give the client the ability to add/modify Artwork from it's own CatalogPageAdmin or from a Gridfield on Artist. However, when I add CatalogPageGridFieldDetailForm to either a RecordEditor or RelationEditor on Artist it always saves the Artwork to the first Artist and boots me back to teh ArtistAdmin when publishing the Artwork

isPublished() Fatal Error

Hey guys,
Really diggin' this addon.

I've got two things - how do I go about adding GridFieldButtons to my CatalogModelAdmin? My existing buttons that were working before installing the module no longer works.

The other thing - the filter search within the CatalogModelAdmin has been quite buggy and some things don't show up in search.

But the main thing I want to bring up is that some article pages which are controlled within a CatalogModelAdmin cannot be seen in the list, so I tried to access the edit page of an article page manually at "/admin/articleadmin/ArticlePage/EditForm/field/ArticlePage/item/12345/edit". I get a white page of death but with the power of display_errors. I found this error to appear:

"Fatal error: Call to a member function isPublished() on a non-object in /silverstripe-catalogmanager/code/Forms/CatalogPageGridFieldDetailForm.php on line 29".

Config value $parentClass now an array

Updating to current verion broke my app, cause the $parentClass config value is now an array.

Docs haven't been updated, though i'd prefer to rename the config value to $parentClasses (plural) and make a getter which checks if the config value is an array or a string and wraps this in an array.

Maybe first deprecate the old name parentClass and remove in a future release.

Please keep track of braking changes in the readme / changelog.

I can provide a patch for this if you want me to.

possibility to hide managed page types from sitetree

would be great if sitetree wasn't cluttered with tons of managed pages (e.g. event calendar etc..)

Lumberjack is doing this by augmenting Hierarchy and overwriting stageChildren() and liveChildren().

We could also try to filter specific page types out using Hierarchies augmentStageChildren callback - why doesn't liveChildren() has a callback?

Published / Save & Publish button's state doesn't update

When you edit a Page via the CatalogManager the Published button's stage doesn't change when you edit a field. If I edit a page normally in the SiteTree then the Published buttons state does change when I start editing a different field (and then click out of it).

When you are creating a new page via the CatalogManager, I notice that the button says 'Save & Publish' by default.

Tested with a fresh 3.5.1 composer install, then
composer require littlegiant/silverstripe-catalogmanager

I created a TestHolderPage as the parent and TestPage as the child.

TestPage:
  extensions:
    - CatalogPageExtension
  parentClass:
    - 'TestHolderPage'

TestHolderPage:
  extensions:
    - HidePageChildrenExtension

Is my config for this.

URLSegment update

Hi again,
When a catalog page (or a singlepage for that matter) is reloaded in the CMS, some JavaScript (like updating the URLSegement on hitting on the Title field, no longer work.

This is because CMSMain.EditForm.js is only loaded from the CMSPagesController and the CMSSettingsController. So on a straight reload of any of the other menu items it is not available at that point.

Solution in your CatalogPageAdmin:

public function init() 
{
  parent::init();
  Requirements::javascript(CMS_DIR . '/javascript/CMSMain.EditForm.js');
} 

Martine

Summary field Enabled twice

Somehow declaring Enabled in DataExension's static $summary_fields leads to the Enabled column twice. Maybe a bug in Silverstripe?

using instead

    public function updateSummaryFields(&$fields){
        $fields['getEnabledStatus'] = 'Enabled';
    }

solves the problem

BTW: i once provided a possibility to enable / disable a dataobject inside the grid list to https://github.com/Firesphere/silverstripe-newsmodule . are you interested in such a solution for your module?

documentation lacks namespaces

It seems the yml-examples lack the correct notation of the Extensions.

For example:

  extensions:
    - CatalogPageExtension
  parent_classes:
    - CatalogParentPage

should be:

  extensions:
    - LittleGiant\CatalogManager\Extensions\CatalogPageExtension
  parent_classes:
    - LittleGiant\CatalogManager\Extensions\CatalogParentPage

Or did I missed something, that it would work without namespaces in the YML?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.