https://groups.google.com/d/forum/silverstripe-devSilverStripe Core DevelopmentDiscussions on the core development of the SilverStripe CMS and its modules: New and changed APIs, architecture and other complex issues requiring the attention of core developers.
<br>This group is not a support forum. If are looking for help, please see <a href="http://silverstripe.org/forums/">http://silverstripe.org/forums/</a>Google GroupsDavid Alexander2017-04-29T05:29:38Zhttps://groups.google.com/d/topic/silverstripe-dev/d-uaYWg4uSYRe: [silverstripe-dev] Re: New developer(s) required for PHPstorm SilverStripe plugin....and you are keen to get work on it moving along! It would be good to get a few of us working on it semi-regularly. I had a quick look over all of the code and the Java used doesn't appear to use any really complex features of the language, although I will need to remind myself how JavaMatthew Hailwood2017-04-27T23:21:50Zhttps://groups.google.com/d/topic/silverstripe-dev/d-uaYWg4uSYRe: [silverstripe-dev] Re: New developer(s) required for PHPstorm SilverStripe plugin.The big thing to understand is the Jflex syntax which is here https://github.com/raket/idea-silverstripe/blob/master/src/com/raket/silverstripe/SilverStripe.flex I would suggest that to get into it attempt to just update the demo text for code colours to be actual SS template code which will tellDavid Alexander2017-04-27T23:00:44Zhttps://groups.google.com/d/topic/silverstripe-dev/d-uaYWg4uSYRe: [silverstripe-dev] Re: New developer(s) required for PHPstorm SilverStripe plugin.I would like to get into this. Time is the enemy here though! I will make a start reading the documentation Matthew posted...Patrick Nelson2017-04-27T22:04:28Zhttps://groups.google.com/d/topic/silverstripe-dev/d-uaYWg4uSYRe: [silverstripe-dev] Re: New developer(s) required for PHPstorm SilverStripe plugin.Curious: Has anyone picked this up yet? It stinks that we have an open source project like this that people are making heavy use of but nobody to help maintain it. I guess you don't really notice it until you find bugs (or features) and it affects you. Just wondering. I think part of this isnicolaas2017-04-23T22:33:28Zhttps://groups.google.com/d/topic/silverstripe-dev/n-FZ8pSsWD8Re: [silverstripe-dev] Re: double entries on unique keys - best way to deal with them in SilverstripeHi Simon, Thank you for your response. I had a closer look at this. It does appear that there is a real initial write. Here is the call stack: ... starting from the DataObject::write() call: [image: Inline images 1] And here is the DataObject::writeBaseRecord method ... [image: InlineSimon Erkelens2017-04-22T09:52:37Zhttps://groups.google.com/d/topic/silverstripe-dev/n-FZ8pSsWD8Re: double entries on unique keys - best way to deal with them in SilverstripeI'm somewhat unaware of this, but as far as I know, the initial `write` you are talking about, is not an active write, but just a bootstrapping of the object. On Wednesday, 19 April 2017 10:58:00 UTC+12, nicolaas wrote: > > > > > Hi, > > We are inserting data into a table which has a uniqueSimon Erkelens2017-04-22T09:48:21Zhttps://groups.google.com/d/topic/silverstripe-dev/jdHMvrCdtnEUpgrade Authenticator and all that is tied in to ithttps://github.com/silverstripe/silverstripe-framework/pull/6829 Today at hackfest, me and Sam have been working on improving the Authenticator. After the initial work from Sam, I've added the option for multiple login forms and integrate that seamlessly, without having to hack into Security.nicolaas2017-04-18T22:58:00Zhttps://groups.google.com/d/topic/silverstripe-dev/n-FZ8pSsWD8double entries on unique keys - best way to deal with them in Silverstripe Hi, We are inserting data into a table which has a unique index (relationA+relationB+relationC sort of thing). We are creating these rows using the standard SS method, e.g. $array = array( 'RelationAID' => $x, 'RelationBID' => $y, 'RelationCID' => $z ); $obj = MyObject::get()->nicolaas2017-04-05T21:50:49Zhttps://groups.google.com/d/topic/silverstripe-dev/1uzYwIQOBTgRe: [silverstripe-dev] Re: working with webpack - managing Page based variables - what is best practice?We would like to make a small website in 4.0 with webpack. What is the best way to get started - has anything changed since our last post? Install: composer create-project --keep-vcs --dev silverstripe/installer ./my/website/folder 4.0.x-dev Modules to add: https://github.com/unclecheese/silverSam Minnée2017-03-29T23:14:52Zhttps://groups.google.com/d/topic/silverstripe-dev/IXgn8CmmddASS3 and PHP7 - RFCHi everyone, I just wanted to make you all aware of an RFC I've posted regarding the SS3 EOL date and PHP7 support: https://github.com/silverstripe/silverstripe-framework/issues/6759 Thanks, SamIngo Schommer2017-03-15T01:18:23Zhttps://groups.google.com/d/topic/silverstripe-dev/rfy9y2xuD-sDrop PHP 5.5 support in SilverStripe 4.0?See https://github.com/silverstripe/silverstripe-framework/issues/6705 - please comment on GithubSam Minnée2017-03-01T22:31:10Zhttps://groups.google.com/d/topic/silverstripe-dev/_vQYG6hgq98Re: [silverstripe-dev] PolymorphicForeignKey2 fields is the best way to store this, as the class can be an enum and the ID can be an int. this allows for better indexing. A single, eg, string field would lead to slower index look-ups PolymorphicForeignKey should generate a pair of database fields in this way, and treat it as one propertynicolaas2017-03-01T22:18:35Zhttps://groups.google.com/d/topic/silverstripe-dev/_vQYG6hgq98PolymorphicForeignKeyHi, Does anyone have an example of PolymorphicForeignKey usage? We tend to use two DB fields (MyRelationClassName + MyRelationID) for relationships to DataObjects of various types (for example, right now, I am adding a Note DataObject which has_one parent, where parent can be one of severalDamian Mooyman2017-02-09T21:59:44Zhttps://groups.google.com/d/topic/silverstripe-dev/q5khashNiuYRe: Replace SilverStripe ConfigHello, I have written up an RFC regarding gathering user-feedback on the proposed user-visible config API. Please see https://github.com/silverstripe/silverstripe-framework/issues/6611 and leave your vote and/or comments. Note that this RFC only covers the API surface, and does not includePatrick Nelson2017-02-08T03:23:22Zhttps://groups.google.com/d/topic/silverstripe-dev/OmL41-Km9OYSS-2017-001: XSS In page name (and a question)I noticed a low severity vulnerability was posted in our security releases page here: https://www.silverstripe.org/download/security-releases/ss-2017-001/ I'm having trouble understanding the description. Could someone please provide a more detailed explanation, or better, a PoC for this as wellnicolaas2017-01-31T07:34:34Zhttps://groups.google.com/d/topic/silverstripe-dev/K3dGQZumMTkRe: addons experimentI have made a few improvements to ssmods.com. Still plenty to do! Feel free to provide any feedback or requests for improvements. Cheers Nicolaas nicolaas2017-01-22T11:23:07Zhttps://groups.google.com/d/topic/silverstripe-dev/K3dGQZumMTkaddons experimentHi Everyone, I have been working on an alternative version of addons: ssmods.com It is just an experiment at the moment. I have been keen to improve addons for a fair few years now and I have finally given it a go. ssmods.com is not meant to replace addons.silverstripe.org - it is simply aIngo Schommer2017-01-17T22:46:45Zhttps://groups.google.com/d/topic/silverstripe-dev/7TgVnfNIPFIRemove WebPI installer?Is anybody using the Microsoft WebPI installer to get SilverStripe running on Windows (with SQL Server and IIS)? My assumption is that it's rarely used, and the effort of maintaining releases for it is better spent elsewhere. Details on https://github.com/silverstripe/silverstripe-framework/pull/6Stevie Mayhew2016-12-12T19:35:21Zhttps://groups.google.com/d/topic/silverstripe-dev/p312W8Qh2fMRe: [silverstripe-dev] Re: Giving a greater Role to Silverstripe SakeWe've recently released a REPL for SilverStripe - https://github.com/littlegiant/sliver Being able to extend the "new" sake to include things like this would be ideal. On Thursday, 24 November 2016 22:06:46 UTC+13, Simon Erkelens wrote: > > +1 on integrating Martijn's work into a new, moreSam Minnée2016-12-12T19:22:01Zhttps://groups.google.com/d/topic/silverstripe-dev/zx72ErBBlKoRe: [silverstripe-dev] fixing racing condition like caching issuesNicolaas, you've just suggested that your own hand rolled version of queuedjobs. It would probably be better to use queuedjobs? On Mon, 12 Dec 2016 at 9:53 PM, Nicolaas Thiemen Francken <nfra...@gmail.com> wrote: > My first guess (due to lack of code) is that templates are involved, yes, > butWerner Krauss2016-12-12T19:00:33Zhttps://groups.google.com/d/topic/silverstripe-dev/zx72ErBBlKoAW: [silverstripe-dev] fixing racing condition like caching issuesEducated guess: you don’t reload data from DB before you pass it to the mail? Sometimes when writing to DB not all changes are reflected in the current object, so in doubt re-fetch the data. Von: nfra...@gmail.com [mailto:silverst...@googlegroups.com] Im Auftrag von Nicolaas Thiemen Franckennicolaas2016-12-12T08:53:47Zhttps://groups.google.com/d/topic/silverstripe-dev/zx72ErBBlKoRe: [silverstripe-dev] fixing racing condition like caching issuesMy first guess (due to lack of code) is that templates are involved, yes, but may be getting reused within the same request (since template values are idempotent, or, don't change once called). I think that is the issue. Thank you for your questions and ideas Patrick. I am experiencing thisSam Minnée2016-12-12T08:02:22Zhttps://groups.google.com/d/topic/silverstripe-dev/zx72ErBBlKoRe: [silverstripe-dev] fixing racing condition like caching issuesIt's a bit of a sledgehammer to crack a nut, but you could install the queuedjobs module and then do the actual email send from within a queued job. This will mean it is called from a different context. It would also mean that any execution time for sending the email wouldn't block your websitePatrick Nelson2016-12-12T05:05:47Zhttps://groups.google.com/d/topic/silverstripe-dev/zx72ErBBlKoRe: [silverstripe-dev] fixing racing condition like caching issuesDo you have a code sample that demonstrates the full cycle (particularly to ensure it's reproducible)? It's unclear what could be causing that without a bit more context. i.e. This requires us to know things that we cannot know e.g. what's actually in the email? what is supposed to be in thenicolaas2016-12-12T04:54:10Zhttps://groups.google.com/d/topic/silverstripe-dev/zx72ErBBlKofixing racing condition like caching issuesHi, I am having a hard time trying to fix racing condition like issues: - User presses go. - Site does a bunch of stuff (and saves in Database) - E-mail is sent to user. ISSUE When the email is sent to the user, the data in the e-mail is not what is actually supposed to be in theRichard Rudy2016-12-12T02:02:41Zhttps://groups.google.com/d/topic/silverstripe-dev/GBYJTmVUUtoShould Menu() and getMenu() be renamed?This issue came up on the repo #1696. It may worth while looking into changing the name of the function to something less generic. While using the Menu function is easy to type, it may be too generic. Beyond changing the names of the actual functions, depending on the name it may necessitatenicolaas2016-12-08T10:09:45Zhttps://groups.google.com/d/topic/silverstripe-dev/NFS2UXW8uEURe: memcache helpI have had a further look at this and it seems that there are some issues with the SS_Cache that can slow down your site: The issues are: 1. cross pollination between sites https://github.com/silverstripe/silverstripe-framework/issues/6358 2. random / frequent clears of caches (to be confirmed)Tony Air2016-12-05T06:59:04Zhttps://groups.google.com/d/topic/silverstripe-dev/S4mPHYgL2KYRe: NGINX extra SecurityHere's some more lists can be added: https://github.com/firehol/blocklist-ipsets http://iplists.firehol.org/ On Monday, December 5, 2016 at 9:32:26 AM UTC+3, Simon Erkelens wrote: > > Did you happen to have a look here? > https://github.com/mariusv/nginx-badbot-blocker > > On Sunday, 4 DecemberTony Air2016-12-05T06:39:00Zhttps://groups.google.com/d/topic/silverstripe-dev/S4mPHYgL2KYRe: NGINX extra SecurityNope, but I think I can add some rules. Anyway https://www.iblocklist.com/lists has more detailed lists and they use it to make anon VPNs and update them more frequently from different abuse sources. It's their business not just for fun. On Monday, December 5, 2016 at 9:32:26 AM UTC+3, SimonSimon Erkelens2016-12-05T06:32:26Zhttps://groups.google.com/d/topic/silverstripe-dev/S4mPHYgL2KYRe: NGINX extra SecurityDid you happen to have a look here? https://github.com/mariusv/nginx-badbot-blocker On Sunday, 4 December 2016 21:45:22 UTC+13, Tony Air wrote: > > hi guys, I had some troubles with hacker attacks and bad referers so I > have made auto updating NGINX configuration with extended black lists >Damian Mooyman2016-12-05T00:16:34Zhttps://groups.google.com/d/topic/silverstripe-dev/0qMnMDWBu4ENew RFC: Form RequestHandler abstractionHello, we have now posted a new RFC at https://github.com/silverstripe/silverstripe-framework/issues/6362. This RFC proposes a refactor of the Form class into separate model and controller components. I welcome anyone interested to read and leave their comments. ;) Kind regards, Damian Mooymannicolaas2016-12-04T22:37:57Zhttps://groups.google.com/d/topic/silverstripe-dev/NFS2UXW8uEUmemcache helpHi, I just posted this question on stack overflow: http://stackoverflow.com/questions/40964315/stop-memcache-from-removing-data-in-php-silverstripe-zend-cache There is clearly something wrong, but I am not sure how to solve it. I did read about having a uniform size cache item, but that isTony Air2016-12-04T08:45:22Zhttps://groups.google.com/d/topic/silverstripe-dev/S4mPHYgL2KYNGINX extra Securityhi guys, I had some troubles with hacker attacks and bad referers so I have made auto updating NGINX configuration with extended black lists features. I think it will be helpful for others: https://github.com/a2nt/nginx-securitynicolaas2016-12-01T03:14:32Zhttps://groups.google.com/d/topic/silverstripe-dev/IqkH5UPMRuIRe: [silverstripe-dev] Re: websites slow? what module is to blame?Thank ya'll for the great replies! @Jonathon What was super interesting is that when we changed the template from "lots of $%^&" to literally "test" (i.e. page just outputs the word test on the screen) there was hardly any difference (cant remember exact numbers, but it may have reduced theMichael Strong2016-11-30T22:40:14Zhttps://groups.google.com/d/topic/silverstripe-dev/k3fQr9QUxTkRe: [silverstripe-dev] How to deal with credentials/key files in a (reasonably) safe wayFurther to Sam's comments you may want to look at the vault by Hashicorp: https://www.hashicorp.com/blog/vault.html I can't vouch for it as I've never used it, but have seen it demoed and it looks to tick all the right boxes. On 1 December 2016 at 10:06, Christopher Pitt <cgp...@gmail.com>Christopher Pitt2016-11-30T21:06:40Zhttps://groups.google.com/d/topic/silverstripe-dev/k3fQr9QUxTkRe: [silverstripe-dev] How to deal with credentials/key files in a (reasonably) safe way...also, there's this: https://github.com/silverstripe/silverstripe-framework/pull/6337Sam Minnée2016-11-30T20:19:46Zhttps://groups.google.com/d/topic/silverstripe-dev/k3fQr9QUxTkRe: [silverstripe-dev] How to deal with credentials/key files in a (reasonably) safe wayHi Michael, The recommended approach is to store your API credentials as defines in an _ss_environment.php file. - Don't check this file into your git repo, manage it separately. You don't want to share your credentials with everyone who has access to the repo. - You can put this file in 1Michael van Schaik2016-11-30T16:44:13Zhttps://groups.google.com/d/topic/silverstripe-dev/k3fQr9QUxTkHow to deal with credentials/key files in a (reasonably) safe wayI'm more often integrating various cloud services into projects lately, and was wondering what would be considered the/a correct way of storing their API credentials in a SilverStripe project. For example, for Google Cloud services, one can create a 'Service Account' - which is something likeJonathon Menz2016-11-30T16:17:57Zhttps://groups.google.com/d/topic/silverstripe-dev/IqkH5UPMRuIRe: websites slow? what module is to blame?Another factor may be that a fresh install won't be spending a lot of time on template rendering. You'll be looping over 3 pages to build a menu and spit out some content and that's about it. Once you have a lot of pages and dataobjects to iterate over I guess that could add a lot of load. I likeswaiba2016-11-30T15:01:01Zhttps://groups.google.com/d/topic/silverstripe-dev/IqkH5UPMRuIRe: websites slow? what module is to blame?Generally, I've just used the xdebug grind outputs and to identify bottlenecks that way. There was a mention of some modules that give a function / query overview of this time taken (like the network tab in chrome dev tools) which would also be useful. I would not see the adding / removal ofSimon Erkelens2016-11-30T06:35:59Zhttps://groups.google.com/d/topic/silverstripe-dev/IqkH5UPMRuIRe: websites slow? what module is to blame?I've not tried anything like removing module-by-module, but it's obvious the more modules, the larger the application gets. Installing XHProf is a good start, although you don't need a module for it On Wednesday, 30 November 2016 16:05:06 UTC+13, nicolaas wrote: > > Hi, > > We have to two sitesnicolaas2016-11-30T03:05:06Zhttps://groups.google.com/d/topic/silverstripe-dev/IqkH5UPMRuIwebsites slow? what module is to blame?Hi, We have to two sites that load in 200ms / 300ms respectively (on my dev machine). A fresh install of SS 3.5 loads in about 35ms. I was wondering if anyone has worked out a quick and easy way to find the bottle necks. There are two modules that could help: - https://github.com/heyday/Florian Thoma2016-11-25T01:22:10Zhttps://groups.google.com/d/topic/silverstripe-dev/q5khashNiuYRE: [silverstripe-dev] Re: Replace SilverStripe ConfigThanks, Michael! ;)Michael Strong2016-11-25T00:58:56Zhttps://groups.google.com/d/topic/silverstripe-dev/q5khashNiuYRe: [silverstripe-dev] Re: Replace SilverStripe ConfigMy advice would be to submit a PR to the offending modules - they should also rely on constants or provide setter methods (they're still a thing!). For now, update seems like a the best option. If its just replacing strings then it shouldn't introduce any performance issues. On 25 November 2016Florian Thoma2016-11-25T00:37:23Zhttps://groups.google.com/d/topic/silverstripe-dev/q5khashNiuYRE: [silverstripe-dev] Re: Replace SilverStripe ConfigHi Michael, I agree with everything you say. We are now dependant on that config system. There will always be some sort of a config, whether that’s private statics, constants, yml or XYZ doesn’t really matter. Your example works fine if you develop all modules yourself, but we need aMichael Strong2016-11-24T09:08:19Zhttps://groups.google.com/d/topic/silverstripe-dev/q5khashNiuYRe: [silverstripe-dev] Re: Replace SilverStripe ConfigHey Flo, Sorry for the late reply and I hope what I'm about to say isn't gibberish! I think SilverStripe is already over-dependent on the config system. Its already so entrenched to the point that SilverStripe core components can't function without it which is a bad position to be in in anSimon Erkelens2016-11-24T09:06:46Zhttps://groups.google.com/d/topic/silverstripe-dev/p312W8Qh2fMRe: [silverstripe-dev] Re: Giving a greater Role to Silverstripe Sake+1 on integrating Martijn's work into a new, more functional and useable Sake. On Thursday, 24 November 2016 12:30:11 UTC+13, Lamin Barrow wrote: > > @Sam I think that will be an excellent idea as well and It could be one > of the big highlights of the 4.0 release coming soon. > > On Tue, NovLamin Barrow2016-11-23T23:30:11Zhttps://groups.google.com/d/topic/silverstripe-dev/p312W8Qh2fMRe: [silverstripe-dev] Re: Giving a greater Role to Silverstripe Sake@Sam I think that will be an excellent idea as well and It could be one of the big highlights of the 4.0 release coming soon. On Tue, Nov 22, 2016 at 7:43 PM, Tony Air <dark...@gmail.com> wrote: > I vote to deprecate sake and axyr's console looks like better alternative > and console aspadbor2016-11-23T17:10:59Zhttps://groups.google.com/d/topic/silverstripe-dev/szQhsfLcVwIRe: [silverstripe-dev] Error Deleting Data from DatabaseThanks Patrick. I had already fixed by renaming my field in $db to DeleteMe. On Wed, Nov 23, 2016 at 1:26 PM, Patrick Nelson <p...@catchyour.com> wrote: > Great find! I haven't tested this to confirm your bug but I can see how > this might be an issue. I think a good solution for your code,Fred Condo2016-11-23T16:43:33Zhttps://groups.google.com/d/topic/silverstripe-dev/szQhsfLcVwIRe: Error Deleting Data from DatabaseVery good catch. For those trying to reproduce, you have to create a model admin for the model to trigger this bug. Then it is 100% reproducible. On Wednesday, November 23, 2016 at 3:42:45 AM UTC-8, padbor wrote: > > Consider this: > > > > private static $db = array( > "Show" => "Boolean", >