Giter Site home page Giter Site logo

silverstripe / silverstripe-cms Goto Github PK

View Code? Open in Web Editor NEW
511.0 63.0 331.0 18.51 MB

Silverstripe CMS - this is a module for Silverstripe Framework rather than a standalone app. Use https://github.com/silverstripe/silverstripe-installer/ to set this up.

Home Page: http://silverstripe.org/

License: BSD 3-Clause "New" or "Revised" License

PHP 71.19% JavaScript 21.66% Scheme 2.17% Gherkin 4.35% SCSS 0.62%
cms hacktoberfest

silverstripe-cms's Introduction

Silverstripe CMS

CI Silverstripe supported module

PHP Content Management System (CMS), see http://silverstripe.org. Requires the framework module and a silverstripe-installer base project.

Installation

See the getting started documentation.

Bugtracker

Bugs are tracked on github.com. Please read our issue reporting guidelines.

Development and Contribution

If you would like to make changes to the Silverstripe core codebase, we have an extensive guide to contributing code.

Links

silverstripe-cms's People

Contributors

ajoneil avatar ajshort avatar andrewandante avatar bergice avatar chillu avatar clarkepaul avatar dependabot[bot] avatar dhensby avatar dnsl48 avatar emteknetnz avatar flamerohr avatar geoff-silverstripe avatar github-actions[bot] avatar guysartorelli avatar halkyon avatar hayden avatar kinglozzer avatar lingo avatar mateusz avatar maxime-rainville avatar normann avatar phalkunz avatar rixth avatar robbieaverill avatar sabina-talipova avatar scopeynz avatar scott1702 avatar simonwelsh avatar sminnee avatar wilr 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

silverstripe-cms's Issues

[2011-09-20] Title in Editor dont' shows correctly in German language

created by: Diskette
created at: 2011-09-20
original ticket: http://open.silverstripe.org/ticket/6722


The TinyMCE Editor in German dont shows the translated "HTML Source Editor" title on the top of Browser Pop-Up and also the title "Line numbers" correctly.

== '''Images''' ==

German TinyMCE

[[Image(http://ind01.bilderkiste.org/7131650304936/tinymce_de.jpg)]]

English TinyMCE

[[Image(http://ind01.bilderkiste.org/6131650306595/tinymce_en.jpg)]]

[2011-04-04] File Sync adds Case Sensitive Files as new ones

created by: spankmaster79
created at: 2011-04-04
original ticket: http://open.silverstripe.org/ticket/6582


Having two files in a folder which have the same name but different character case, causes Silverstripe to delete one of the files from the database first and then adds it back in with a new file ID.

http://open.silverstripe.org/ticket/71 /sapphire/filesystem/Folder.php

Name Column in Database should be Varbinary or a case sensitive collation that prevents that.

http://dev.mysql.com/doc/refman/5.0/en/case-sensitivity.html

[2011-09-09] Replace/update Diff.php engine in core

created by: @chillu (ischommer)
created at: 2011-09-09
original ticket: http://open.silverstripe.org/ticket/6715


Boys and girls, I present to you the epic tale of Diff.php in SilverStripe.

We're using a third party lib Diff.php, and customized it over the years: http://open.silverstripe.org/log/modules/cms/trunk/code/Diff.php
Its original addition was least 4 years ago, before we open sourced. Can't trace it back further unfortunately.

The main motivation for writing this is getting an upgraded and tested
Diff engine into core, but also to resolve a licensing issue: The included file states "You may copy this code freely under the conditions of the GPL." - thats very ambiguous, and has been changed to LGPL in a later version. But in this form, you could argue that we're not allowed to redistribute/modify the library with a BSD license.

The third party code has since evolved as follows:

Alternatives I've found so far:

Other relevant info:

Recommended approach: Find out what changed in the library since we've started using it,
and if our customizations are still necessary. Upgrade to the latest Text_Diff from Pear,
or review how Wordpress got the Horde version to work for their purposes.

[2011-08-10] Trailing Slash Canonical Issue

created by: [email protected]
created at: 2011-08-10
original ticket: http://open.silverstripe.org/ticket/6700


Trailing Slash Canonical Issue

http://www.gpmd.co.uk/blog
redirects to:
http://www.gpmd.co.uk/blog/?url=/blog

and this URL is also indexed:
http://www.gpmd.co.uk/blog/

We understand that this is because there is a module installed called /blog but this has a large impact on SEO.

The trailing slash canonical issue means that there are two versions of each page of a website. As these two pages are identical apart from the slash, Google will crawl both pages and devalue them both as a result of duplicate content.

Also, when people link to the different URLs, only those links going to the primary version of the page will influence rankings.

This why there should be a re-write rule that automatically 301 redirects one version to the other, carry pagerank or link juice with it.

[2012-01-10] RedirectorPage and Redirector rules conflict

created by: @stevevu (aragonne)
created at: 2012-01-10
original ticket: http://open.silverstripe.org/ticket/6832


Hi,

The below is an always reproducible bug when the standard Director Rule $URLSegment//$Action/$ID/$OtherID exists and used in conjunction with descendent pages of RedirectorPage:

An http request for an unpublished (or non-existent) descendant page of RedirectorPage will always take the user to the redirector page instead of the 404 error page.

For example, let's say we have the following site hierarchy:

rp (RedirectorPage, published)
    |- up (Page, unpublished)
    |- pp (Page, published)

A request for the 'up' should result in a 404 page being returned, but instead the 'rp' page is returned.

I think the sequence of action that might be causing this is:

I. page is requested
II. Does page exist?
A. Yes: return the requested page (eg, the /rp/pp page)
B. No; check Director rules
i. do any Director Rules match?
a. yes (in this example, $URLSegment//$Action/$ID/$OtherID matches the /rp/up request, where $URLSegment = '/rp' and $Action = 'up'). SilverStripe searches in the RedirectorPage 'rp' for a method called 'up' but since the init() method is executed first, the request is automatically forwarded to the the page to redirect to
b. no, correct SilverStripe behavior?

[2012-02-19] Broken link tracking doesn't pick up corrupted internal links

created by: @sminnee (sminnee)
created at: 2012-02-19
original ticket: http://open.silverstripe.org/ticket/6866


The broken links report focuses on identifying internal links that have broken. However a corrupted [sitetree_link ...] code doesn't get picked up and therefore the broken link can get missed.

I would recommend amending the broken link detection (in HtmlEditorField::saveInto()) to mark as broken any link that can't be parsed, as well as any external link that resolves to a 404.

Checking external links may need to be something that is optionally enabled, since resolving those links could cause problems in certain configurations. It would be nice if the resolution of external links could be put into a message queue, but this isn't critical.

[2012-03-08] Editing a home page name on admin session timeout creates new default home page

created by: lpercy
created at: 2012-03-08
original ticket: http://open.silverstripe.org/ticket/6919


'''Description'''

When editing a Home page title name after your Admin session has timed out the CMS will generate a new default Home page.

'''Test Scenario'''

  1. Visit http://two.ss3.test.silverstripe.com/admin
  2. Edit your existing Home page name to Home New
  3. Save and Publish
  4. Edit the Page name again to Home Page newer
  5. Wait 5-10 minutes for session to time out
  6. Click Save and Publish
  7. Goto to front end and refresh

Actual Result:

A second default Home page appears

Expected Result:

New Default page should not appear when editing existing pages.

[2011-07-26] Circular reference in Sitetree causes Fatal error memory exhausted

created by: omarkohl
created at: 2011-07-26
original ticket: http://open.silverstripe.org/ticket/6688


If you have page A with child page B. Then move page B to the root and move page A to be child of B. You may save both pages (though it doesn't matter if you do) but you may NOT PUBLISH them. Try reloading the Backend and enjoy.

Root--A--B (original)
Root--B--A

Second possibility: Again exchange both pages and this time save and publish A (the child page). Same result.

Only if you save and publish B (the parent) it works.

The reason for this is of course a circular reference. But in the first scenario there is no real circular reference (you can't see it in the DB). It has something to do with the fact that the Sitetree and Sitetree_Live tables have differing information on who is who's parent. In the second scenario you get a true circular reference in the Sitetree_live table.

SiteTree::batch_permission_check() is a recursive function that gets called for every child page (in this case infinite loop of children) until memory runs out.

[2011-10-27] Requirements engine code insertion bug

created by: vwd
created at: 2011-10-27
original ticket: http://open.silverstripe.org/ticket/6755


Hi,

I've noticed that there is a small problem with the Requirements engine and where it inserts the JS at the end.

If there is a <script> tag just before it seems to insert all the Requirements::javacsript and Requirements::customScript stack just before it.

See example page.ss ([http://www.sspaste.com/paste/show/4ea8e77527289]) and page.php [http://www.sspaste.com/paste/show/4ea8eb5f8d5e8].

Interestingly, if I insert a space after the '<' and before 'script' (in <script>) eg. '< script>', the parser obviously skips past that tag. See workaround script ([http://www.sspaste.com/paste/show/4ea8ea477e5a2])

[2012-01-12] is_uploaded_file problem in Files and Images section

created by: @Josua2012 (josua)
assigned to: Jose A.
created at: 2012-01-12
original ticket: http://open.silverstripe.org/ticket/6834


After using '''move_uploaded_file''' (AssetAdmin.php Line:225) the '''is_uploaded_file''' function (Upload.php Line: 480) return '''false'''.

'''is_uploaded_file''' function should be used with the '''original path and name''' of the uploaded file to work properly.

Therefore, this check should be removed from the validate() function (Upload.php) and included in the doUpload($data, $form) function (AssetAdmin.php).

[2012-02-29] Better user feedback on faulty Ajax responses

created by: @chillu (ischommer)
created at: 2012-02-29
original ticket: http://open.silverstripe.org/ticket/6872


Provide better visual feedback on application errors, which can occur by loading a new page/panel,
but also on other user actions, most of them involving Ajax (e.g. reordering tree nodes).

Currently we use the jQuery.notice plugin for this (http://code.google.com/p/jquery-notice/wiki/Implementation). It shows up as a grey box (like the growl plugin for OSX). It doesn't indicate an error well, and is a bit "out of sight" (top right). Those messages are triggered through the global statusMessage() and errorMessage() methods.

We have two "types" of alerts, "good" and "bad". I suggest that we follow
the Twitter Bootstrap conventions here (http://twitter.github.com/bootstrap/components.html#alerts)
and use "error", "success" and "info" instead, each with their own styling.

I suggest that we center the message, fade out after 3 secs, give the user an option to close explicitly.
The fadeout should be disabled if the user hovers over the item, to give him a chance to read the whole text.
The text is usually a handful of words, but particularly in development mode might
be much longer (up to an A4 page of text).

Note: An easy way to simulate a server error is to add "throw Exception('My exception')'"
in the first line of the show() method in LeftAndMain.php, and try to open a page from admin/pages.

[2011-04-09] Error when no side report registered

created by: @smares (smares)
created at: 2011-04-09
original ticket: http://open.silverstripe.org/ticket/6592


If you unregister all side reports within _config.php, Silverstripe will crash because Report.php is trying to merge an empty array. After line 329, use the following:

$sortedListItems = array();
if(!empty($groupedItems))
    $sortedListItems = call_user_func_array('array_merge', $groupedItems);

CMSMain also has to be modified. At the beginning of ReportSelector(), just add

$options = array();

[2011-07-12] Error in RebuildStaticCacheTask.php ?!

created by: tekilla83
created at: 2011-07-12
original ticket: http://open.silverstripe.org/ticket/6679


In an older Version I found:

if($removeAll && file_exists("../cache")) {
 echo "Removing old cache... \n";
 flush();
 Filesystem::removeFolder("../cache", true);
 echo "done.\n\n";
}

in 2.4.5 Line 87 it says:

if($removeAll && !isset($_GET['urls']) && $start == 0 && file_exists("../cache")) {
         echo "Removing stale cache files... \n";
         flush();
         if (FilesystemPublisher::$domain_based_caching) {
            // Glob each dir, then glob each one of those
            foreach(glob(BASE_PATH . '/cache/*', GLOB_ONLYDIR) as $cacheDir) {
               foreach(glob($cacheDir.'/*') as $cacheFile) {
                  $searchCacheFile = trim(str_replace($cacheBaseDir, '', $cacheFile), '\/');
                  if (!in_array($searchCacheFile, $mappedUrls)) {
                     echo " * Deleting $cacheFile\n";
                     @unlink($cacheFile);
                  }
               }
            }
         } else {

         }

         echo "done.\n\n";
      }

Why is the else code empty?
FilesystemPublisher::$domain_based_caching is false for default. Shouldn't there be somethink like this:

Filesystem::removeFolder($cacheBaseDir, true);
touch($cacheBaseDir.'/lock');

If I set:

FilesystemPublisher::$domain_based_caching = true;

In my config.php and changed Link() to AbsoluteLink() in Page->subPagesToCache():

function subPagesToCache($translate='all') {
      $urls = array();
      // add current page
      if($this->nocache!=1){
         $urls[] = $this->AbsoluteLink();
         // add translations
         if($translate=='all'){
            $translations = Translatable::getTranslations();
            if(is_object($translations)){
               foreach($translations as $translation){
                  $urls[] = $translation->AbsoluteLink();
               }
            }
         }
         // cache the RSS feed if comments are enabled
         if ($this->ProvideComments) {
            $urls[] = Director::absoluteBaseURL() . "pagecomment/rss/" . $this->ID;
         }
      }
      return $urls;

It doesn't deleting anything when I make a dev/buildcache so probably there is another error.

PS: I posted it already here: http://silverstripe.org/general-questions/show/17445#post305397

[2012-03-09] Users > Edit Member > Defaults to last used tab not Main

created by: @nzjoel (nzjoel)
created at: 2012-03-09
original ticket: http://open.silverstripe.org/ticket/6959


Expected:
When editing an existing member you are taken to the Main tab every time.

Actual:
When editing an existing member you are taken to either the Main or Permissions tab depending on which one you were on previously.

Environment:
Front end - Mac 10.7.3, Safari 5.1.3, ESI Ph5

Additionally... if you were on the Permissions tab previously and then edit an existing member, you are taken back to the permissions tab, if you then go to the main tab: the "Interface Language" and the "Groups" fields are displayed really narrow (not as wide as the other fields or as they would have been if you opened the main tab directly) - see screenshot.

[2012-03-08] Using Browser 'Back' option after session time out causes layout issues in CMS

created by: lpercy
created at: 2012-03-08
original ticket: http://open.silverstripe.org/ticket/6935


'''Description'''

If a user selects the 'Help' button their page is redirected to another website http://userhelp.silverstripe.org/

After going through various help pages and using the 'Back' button on the browser, the CMS page appears with layout issues, refreshing the page results in variouslayout issues like truncated dropdown boxes etc.

[[Image(CMSLAYOUTTIMEOUT.png,width=400,hieght=600)]]

Refresh layout issues:

[[Image(Refresh.png,width=400,hieght=600)]]

'''Test Scenario'''
''Platform: OSX - Chrome''

  1. Visit http://two.ss3.test.silverstripe.com/admin/
  2. Select any CMS page i.e. Pages
  3. Select the 'Help' button
  4. Sit on Help site for 5-10 minutes
  5. Use the 'Back' button on your Browser

Actual Result:

CMS Layout is broken

Expected Result:

CMS Layout should not be broken

[2012-03-07] Write form field descriptions for core (dev+UX collaboration)

created by: @chillu (ischommer)
created at: 2012-03-07
original ticket: http://open.silverstripe.org/ticket/6903


The framework now allows to add a description to each form field, which is separate from its label.
At the moment, this shows up as a built-in browser tooltop, but will be replaced by a questionmark trigger (see http://open.silverstripe.org/ticket/6898 ).

Go through the core interface and add useful descriptions.
If a field is sufficiently described by its label already, don't bother with a description.

Here's an example for the "Show in search" checkbox (in Page -> Settings):

  • Bad: "Show in search results"
  • Good: "Show this page as part of search results (only applicable if search is enabled)".

Can be a collaboration between a PM-type role (somebody that worked a lot with clients using the CMS),
and a dev who knows about the actual behaviour of form fields, and can change the fields in PHP.

[2012-01-04] Inserting images from Chrome fails

created by: Berkana
created at: 2012-01-04
original ticket: http://open.silverstripe.org/ticket/6826


When I attempt to insert images from the content editor, instead of bringing in the sidebar from the right, as happens in FireFox, the image insertion sidebar seems to come in from the left and is hidden under the page tree sidebar, and is thus unusable.

I shouldn't have to switch browsers just to be able to insert images. (I am not sure if this is a problem with Chrome or SilverStripe, so I'm going to submit reports to Google and SilverStripe.)

See the attached screenshot. There is a little thing peeking out from the left edge of the page tree sidebar. That is what happens when I click on the image insertion icon.

[2012-03-02] Resizable panels (tree/preview)

created by: @chillu (ischommer)
created at: 2012-03-02
original ticket: http://open.silverstripe.org/ticket/6885


The tree for pages and the security section can easily get larger than the available width.
jQuery layout supports resizing panels out of the box: http://www.bramstein.com/projects/jlayout/borderlayout-resize.html
We just need to enable it, and come up with a nice way to visualise the drag handles.
In case performance gets too slow in terms of redraws, the "ghost" mode in jQuery UI resizeable might help: http://jqueryui.com/demos/resizable/#visual-feedback

The new width would need to be saved and restored from a cookie, otherwise its a bit pointless :)

[2011-05-09] Resized images in the wysiwyg editor are not recreated after doing a /dev/tasks/FlushGeneratedImagesTask

created by: gavinbruce
created at: 2011-05-09
original ticket: http://open.silverstripe.org/ticket/6638


When using the WYSIWYG editor in the CMS & inserting images and resizing them, they are saved into the _resampled directory with a filename such as assets/Uploads/blogs/Editorial/evokke-magazine-pia-muhlenbeck/_resampled/resizedimage400533-image005.jpg into the appropriate directory.

This occurs on the saving of a page in the CMS, and the file /sapphire/forms/HtmlEditorField.php handles this in the saveInto function on the lines 105 - 138

However, if you flush the images cache by visiting /dev/tasks/FlushGeneratedImagesTask these resized images will not be re-created unless you go into the admin and save the page again.

There should probably be a check to see if the file_exists when loading the page on the front end, and if it doesn't re-create it on the fly.

[2011-10-17] admin/myprofile link broken for members with restricted access

created by: @schellmax (schellmax)
created at: 2011-10-17
original ticket: http://open.silverstripe.org/ticket/6742


for members without access to the 'pages' section of the cms (i.e. working with some modeladmin only), the 'Profile' link at the bottom bar in the cms is broken ('admin/myprofile').

this is due to a check in the 'canView' method of LeftAndMain.php, returning false in case you don't have a "CMS_ACESS_LeftAndMain" permission (section starting with comment '// Default security check').

a quick fix is inserting the following lines before this:

$params = Director::urlParams();
if($params['Controller'] == 'CMSMain' && $params['Action'] == 'myprofile') return true;

[2011-06-10] sync re-creates files in the database

created by: mmichelli
created at: 2011-06-10
original ticket: http://open.silverstripe.org/ticket/6664


When the "Look for new files" button is pressed, Once in a while, a FOLDER seems to think that it is new, which recursively removes all sub-files from the FILES table and re-creates them in the FILES table. This breaks all galleried that use the Files ID.

For bigger sites this is a huge bug.

http://www.silverstripe.org/dataobjectmanager-module-forum/show/14115?start=8#post290785

[2011-10-20] Partial cacheing degrades CMS performace

created by: Jules
created at: 2011-10-20
original ticket: http://open.silverstripe.org/ticket/6749


With several hundred files in the silverstripe-cache/cache directory, it can take 10 seconds for common CMS functions like displaying SilverStripeNavigator, loading a page in the CMS, or publishing a page. A partial cacheing scheme that results in >100 files has a noticible negative effect on normal CMS usage.

This makes partial cacheing suitable only for small sites, or where per-page cacheing is avoided e.g. cache common HTML like menu & footer, and a few expensive pages like sitemap.

The cause is in Line 53 of Aggregate.php where Aggregate::flushCache calls Zend_Cache_Backend_File->clean, which opens, reads and unserianlses every metadata file (so half the files) in the cache. e.g. When a page is published, Aggregate::flushCache is called 9 times.

I doubt the problem is inherent in the Zend cache because it is so generic. It's more likely to be the way SilverStripe is using it.

DataObject::flushCache has an optional parameter, '$persistant=true', but the parameter is never provided. Changing the default to '$persistant=false' restores normal CMS performance for all operations.

DataObject.php line 2828:
public function flushCache($persistant=false) {

This points to a solution, but I don't think it's THE solution and I don't know what the side-effect are, apart from the cache never being cleared.

Even if DataObject::flushCache(true) is called in one strategic place, it would be too slow. The problem is either the way SilverStripe uses the cache, or the cache mechanism itself.

Zend_Cache_Backend_File->clean has filter options to clear selectively. Maybe Aggregate::flushCache could be changed to be more selective.

This issue was initially raised in the forum:
http://www.silverstripe.org/general-questions/show/18342

[2012-03-01] TreeDropdownField expand on click (unless it has search)

created by: @chillu (ischommer)
created at: 2012-03-01
original ticket: http://open.silverstripe.org/ticket/6884


https://skitch.com/chillu/8gcs6/silverstripe-cms-settings

Those are generic improvements, just demonstrated on the "settings" section.
The "remove separator" should only apply to this specific form though.

Ensure that making the whole dropdownfield expand-on-click doesn't disturb
its operation when used with inline search (the area is an input field in this case, and click shouldn't expand).

[2012-02-29] More fluid layout for CMS form input elements

created by: @chillu (ischommer)
created at: 2012-02-29
original ticket: http://open.silverstripe.org/ticket/6871


Currently, form elements in the CMS are set to "width: 100%; max-width: 512px".
Because the width in this case applies to the whole form width (as no containing element overrides it),
the max-width of 512px always applies. Including the label space of ~180px, this
makes for a minimum form width of around 700px - much larger than necessary for most fields.
This is particularly a problem in smaller forms such as the file info on uploaded fields (in UploadField).

  • Find a way to have fields shrink to widths around 500px (any lower is not a requirement)
  • Investigate "display: table" for this purpose (IE8+ only, so needs some basic IE7 fallbacks)
  • Ensure labels still float correctly into multiple lines
  • Ensure it works with "full-width" fields that don't have labels
  • Ensure it works with more complex fields like chosen.js dropdowns
  • Ensure it works with "form.small" and "form.stacked" styles (see _form.scss)
  • Bonus points for having the ".stacked" form styles automatically apply for widths lower than 500px

Use the https://github.com/silverstripe-labs/silverstripe-frameworktest module to ensure all combinations of fields work correctly with any style changes.

Remember: The goal is to make field styles easier to customize (e.g. indent+nest field groups visually),
not to add a big pile of CSS to make it pixel perfect. Ideally we end up with less CSS than we have at the moment.

[2011-06-01] onAfterWrite called twice makes it hard to have code that executes once

created by: otherjohn
created at: 2011-06-01
original ticket: http://open.silverstripe.org/ticket/6651


When using onAfterWrite to pull page data of a page just created, you get the temporary page data instead.

For example creating a new page in the CMS provides a title of "New Page" and a link of "new-page". If you change the title to anything else (i.e. "Example Page Name") and the same with link and save. Then grab the Title and link during onAfterWrite, you get back a title of "New Page" and a link of "new-page", not "Example Page Name".

Code example

Page.php
```
class Page extends SiteTree {
public function onAfterWrite() {

    parent::onAfterWrite(); 
        DEBUG::message($this->Title);
                    DEBUG::message($this->Link);
}

}



I have tested this with parent::onAfterWrite() at the end of the function also with same results.

[2011-10-07] Returning false from canDeleteFromLive() does not remove 'Unpublish' button

created by: @frankmullenger (frankmullenger)
assigned to: @chillu (ischommer)
created at: 2011-10-07
original ticket: http://open.silverstripe.org/ticket/6731


Returning false from canDeleteFromLive() does not remove 'Unpublish' button from the CMS. The Unpublish button will return an error if pressed in the CMS still though.

Possible patch in SiteTree->getCMSActions()

if($this->isPublished() && $this->canPublish() && !$this->IsDeletedFromStage && $this->canDeleteFromLive()) {
            // "unpublish"
            $unpublish = FormAction::create('unpublish', _t('SiteTree.BUTTONUNPUBLISH', 'Unpublish'), 'delete');
            $unpublish->describe(_t('SiteTree.BUTTONUNPUBLISHDESC', 'Remove this page from the published site'));
            $unpublish->addExtraClass('delete');
            $actions->push($unpublish);
        }

[2012-03-08] Allow priority sorting in CMSBatchActionHandler::register()

created by: @chillu (ischommer)
created at: 2012-03-08
original ticket: http://open.silverstripe.org/ticket/6909


Spun off from https://silverstripe.onjira.com/browse/SSF-59

It already is sorted in the correct order, and you can influence that by the ordering of register() calls already.
We have an issue when a module wants to add actions at a specific position relative to the core actions, but thats kind of theoretical at the moment.

[2011-06-29] iframe becomes self-closed when there's no content

created by: dio5
created at: 2011-06-29
original ticket: http://open.silverstripe.org/ticket/6674


example:

When you embed a YouTube-video with an iframe the iframe get stripped of its closing tag and becomes self-closed, which is a problem.

The issue can be worked around by adding in a blank space or some dummy content.

The problem is in HTMLValue.php by using DOMDocument->saveXML(), which makes all the tags that have no content self-closing.

[2011-07-18] TreeSelectorField.js fails when SecurityID is used (fix provided)

created by: EelkeSpaak
created at: 2011-07-18
original ticket: http://open.silverstripe.org/ticket/6682


The helperURLBase() (sapphire/javascript/TreeSelectorField.js line 47-49) function should be changed to:

helperURLBase: function() {
var formAct = this.ownerForm().action;
var ind = formAct.indexOf('?');
if (ind > -1) {
formAct = formAct.substring(0,ind);
}
return formAct + '/field/' + this.inputTag.name + '/';
},

because this.ownerForm().action will sometimes include the query string, leading to bugs.

I can't make a patch file or anything, but I thought I'd mention it.

[2011-06-16] "change site structure" permission alone shouldn't allow moving pages to root

created by: edrex
created at: 2011-06-16
original ticket: http://open.silverstripe.org/ticket/6666


As a non-admin user with "change site structure" permission, with the root set to be editable only by admins, I can still move pages to the root but not to other edit-restricted pages. This seems inconsistent, and not useful.

I would like it if users could only drop on the root if they had edit privilege on it, since then users could be given "change site structure" to modify their own sections, but not mess up the top level site.

[2012-01-03] CVSParser not saving utf8 to Database

created by: sherkenh
created at: 2012-01-03
original ticket: http://open.silverstripe.org/ticket/6820


Hello. This is my first ticket here as I just started using SilverStripe a few weeks ago. I've searched board and trac but couldn't find any posts mentioning the following issue.

When reading a utf8 encoded csv file while bulk-adding members in the backend, words containing multibyte characters (e.g. , , , for German) are cut off after the last "normal" character. In 2.4.6 I traced down the problem to dev/CSVParsec.php and changed line 175 to use the utf8 encoded version of the string instead of the actual input encoding. I never created a diff file so I hope it is readable.

Thanks for your comment on this issue.

[2011-04-16] default_homepage_link set in RootURLController not used elsewhere

created by: j.m.milmine
created at: 2011-04-16
original ticket: http://open.silverstripe.org/ticket/6600


http://silverstripe.org/general-questions/show/12253
http://silverstripe.org/themes-2/show/9574
http://silverstripe.org/blog-module-forum/show/9364
http://silverstripe.org/archive/show/412
http://silverstripe.org/customising-the-cms/show/10430
http://silverstripe.org/general-questions/show/15665

All the above conversations seem like they would be easily solved.

Currently RootURLController has a variable called $default_homepage_link which is set to 'home'.

This is currently protected.

Now while this is used in RootURLController, it should also be used in StaticExporter->export, SiteTree->breadcrumbs and SiteTree->requireDefaultRecords

Three options:

  1. Make the variable public, then set it in _config if you want to change the default homepage: RootURLController::$default_homepage_link = 'medical-alarms';
  2. Create a setter (there is already a getter) for this variable, use that function is objects above. Use the setter in _config
  3. Leave default_homepage_link and create another variable called some like site_homepage_link, create getters and setters, this be null by default and only used if set, otherwise fallback to default_homepage_link.

Thoughts

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.