silverstripe

Why are mod_expires and mod_headers not working on my server?

≡放荡痞女 提交于 2019-12-11 23:33:48
问题 I've checked my plesk control panel on my vps and those mods are installed but when I run the site through http://redbot.org/ to check what's being sent, I get: This response is negotiated, but doesn't have an appropriate Vary header. The max-age Cache-Control directive appears more than once. Cache-Control: no-cache, max-age=0, must-revalidate, no-transform, max-age=300 So it doesn't look like it's working. Here's the .htaccess that I edited: ### SILVERSTRIPE START ### <Files *.ss> Order

Silverstripe hash link rewriting putting unwanted slash in link

拥有回忆 提交于 2019-12-11 20:17:06
问题 Ok so I am developing a site in Silverstripe CMS that is using anchor links on one of it's pages. Thing is that in Silverstripe there is a rewrite going on that puts slashes before the hash in your links. So in the docs it explains that you can put this in your YAML to disable slashes before hashes: http://doc.silverstripe.org/en/developer_guides/templates/how_tos/disable_anchor_links/ Which I have done like so (YAML validates ok): _config/app.yml: SSViewer: rewrite_hash_links: false And then

Why does silverstripe set my page tables as obsolete one

依然范特西╮ 提交于 2019-12-11 19:52:02
问题 Hello , I have a big problem with silverstripe. Everything was okay until i flushed my site and suddenly i got some errors with this on the dev/build : Table Page: renamed to _obsolete_Page Table Page_versions: renamed to _obsolete_Page_versions Table Page_Live: renamed to _obsolete_Page_Live So silverstripe set all my page tables as obsolete ones and my site does not work anymore! Does anybody already had this issue? I tried to find some explanations in the code but did not find anything...

get Dataobjects from Children - SilverStripe 3.1

回眸只為那壹抹淺笑 提交于 2019-12-11 19:39:36
问题 I've got a GalleryHolder with Gallery-Pages as children. Each Gallery-Page has a Dataobject(VisualObject) to store the images. I managed it to get 3 random images from a GalleryPage on it's gallery page and 3 random images from all galleries on the GalleryHolder page. But what I want are 3 random images for each gallery shown on the GalleryHolder page. Here's my Code, can someone tell me how to do that? GalleryHolder: http://sspaste.com/paste/show/525e4b9134940 Gallery: http://sspaste.com

Silverstripe/PHP/jQuery - Once form has been filled out by user, prevent it from automatically appearing for each visit

强颜欢笑 提交于 2019-12-11 16:43:22
问题 I have been working on a form that has 2 states: in desktop view, the form slides out from the right side of the screen after 5 seconds upon page load, then the user can click a button to close/open it. In mobile view, the form is triggered by a button and appears as a popup. While building it, I didn't take into consideration that having the form automatically slide in or pop up on every single page would be an inconvenience. I have used HTML5 session storage to prevent the form from opening

Silverstripe install.php can't find <mysite>

不羁的心 提交于 2019-12-11 15:24:03
问题 I have working SS v3.4 project locally. Now I want to deploy it. I've copied files to the server, run composer install to install vendor libraries. When I run install.php all requirements are fine except for missing mysite folder errors. That's intended because I renamed my project folder to let's say mydomain and it works fine on localhost. AFAIK SS should pick up the custom folder and recognise it as THE page folder. Somehow it doesn't happen. Any ideas why? 回答1: This is expected, since the

How can I extend SilverStripe “system/internal” routing?

左心房为你撑大大i 提交于 2019-12-11 14:33:38
问题 I have some tree pages like: /business /loans /personal /bad-credit etc. How can extend internal/framework routes (without creating child pages) to get links like: /business/segment /loans/some-segment /personal/some-another-segment /bad-credit/awesome-segment etc. Something like this: --- Name: customroutes After: framework/routes#coreroutes --- Director: rules: 'business/???': 'Custom_Controller' 'loans/???': 'Custom_Controller' 回答1: You don't need custom routing - you just need to add an

Angular - REST Service XML Links with $Resource

谁说我不能喝 提交于 2019-12-11 11:23:25
问题 I am using Angular with SilverStripe for my backend. I am using this module https://github.com/silverstripe/silverstripe-restfulserver for my REST API instead of building it myself. When the API returns a list with a many_many relationship it looks like <Recipe href="http://localhost/groceryList/api/v1/Recipe/2.xml"> <Title>Chilli</Title> <ID>2</ID> <Ingredients linktype="many_many" href="http://localhost/groceryList/api/v1/Recipe/2/Ingredients.xml"> <Ingredient href="http://localhost

Adding member to a group when registering them?

不羁的心 提交于 2019-12-11 10:47:27
问题 I have a registration form that allows a user to register. When they register I want to add them to a group automatically. I have tried using the $member->AddToGroupByCode('Administrators') method but this doesn't add any groups to the member. What am I doing wrong? RegisterForm.php <?php class RegisterForm extends Form { public function __construct($controller, $name) { $fields = new FieldList( TextField::create('FirstName'), TextField::create('Surname'), TextField::create('Email'),

Silverstripe write Page to Live, stage or Draft? How it works

半世苍凉 提交于 2019-12-11 10:02:10
问题 I have some difficulty to update a page by selecting is version... To Create, I do this : $PageCalendrierEvenement = new PageCalendrierEvenement(); $PageCalendrierEvenement->Title = $this->request->postVar('Titre'); $PageCalendrierEvenement->MenuTitle = $this->request->postVar('Titre'); $PageCalendrierEvenement->URLSegment = Utils::remplacerEspaces(Utils::remplacerAccents($PageCalendrierEvenement->Titre)); $PageCalendrierEvenement->publish('Stage'); $PageCalendrierEvenement->doRestoreToStage(