Commit Graph

12388 Commits

Author SHA1 Message Date
Jeremy Thomerson
e6bfabfd6c TEST: additional test for ViewableData not wrapping cached strings 2013-06-21 16:20:00 +00:00
CheeseSucker
761eec7736 Unit test for bugfix in ViewableData::obj(). 2013-06-21 16:17:22 +00:00
CheeseSucker
b52087105c FIX: ViewableData::obj() would sometimes return an empty object
For instance, this happens when these criteria are met:
  1) No casting has been specified for a method in $casting.
  2) A template accesses the field without any casting
  3) Any casts by the template will now yield an empty object.

After a brief look at the commit history, it can seem like this bug is several years old, unless it is a side-effect of other changes in the code.

== Steps to reproduce ==
Add two methods to be accessed by a template. Make sure you do not define an entry in $casting for them:
	public function Testus() {
		return "Te<x>t1";
	}

	public function Testus2() {
		return "Te<x>t2";
	}

Add this to a template:
	<p>
		First access:<br />
		"$Testus" : "$Testus.XML"<br />
		"$Testus2.XML" : "$Testus2"<br />
	</p>
	<p>
		Second access:<br />
		"$Testus" : "$Testus.XML"<br />
		"$Testus2.XML" : "$Testus2"<br />
	</p>

Open the page in a browser, and you will get:
 First access:
"Tet1" : ""
"Te<x>t2" : "Tet2"

Second access:
"Tet1" : ""
"" : "Tet2"

We see that any cast can yield an empty string.
2013-06-21 16:16:49 +00:00
Tom Densham
3596892001 FIX: GridField button styling
Remove all top/bottom margins from buttons and apply to GridFieldButtonRow component. Ensure that all buttons are added to a suitable GridFieldButtonRow in ModelAdmin, SecurityAdmin and Group.
2013-06-21 14:22:00 +01:00
Jeremy Thomerson
7aeaf74c22 MINOR: fix Email class modifying SSViewer.source_file_comments config val
The Email class was updating the SSViewer.source_file_comments value and not
resetting it. If someone had this value set to true in their system and then
used the Email class, it seems there would be an unintended side-effect of
having the source file comments turned off.
2013-06-21 02:36:01 +00:00
Ingo Schommer
e908613c47 Merge pull request #2132 from mateusz/note
Add a note on the unit of the Session.timeout.
2013-06-20 16:00:40 -07:00
Mateusz Uzdowski
53a2dbd207 Add a note on the unit of the Session.timeout. 2013-06-21 10:56:00 +12:00
Ingo Schommer
09ca497b36 Merge pull request #2127 from silverstripe-rebelalliance/cookietimestamp
BUG: Fix for Cookie expiry timeout being passed as a large number on 64 ...
2013-06-20 15:42:07 -07:00
Ingo Schommer
da0cc25c3b Merge pull request #2129 from tractorcow/3.1-htmleditor-mediaform-fixes
BUG Fixed issue in file upload via the HTML Editor media dialogue
2013-06-20 02:10:16 -07:00
Will Rossiter
cf12ccbd2c Merge pull request #2120 from ryanwachtl/patch-1
Missing directory separators in output of suggested _ss_environment paths
2013-06-20 00:16:49 -07:00
Will Rossiter
d1756a5a58 Update simple-contact-form.md 2013-06-20 18:35:12 +12:00
Sean Harvey
ba10d270b3 Merge pull request #2128 from hafriedlander/fix/hashleak
FIX: ConfirmedPasswordField used to expose existing hash
2013-06-19 20:34:53 -07:00
Damian Mooyman
f47383f52e BUG Fixed issue where file upload via the HTML Editor media dialogue would not prompt users to overwrite existing files 2013-06-20 15:21:18 +12:00
Hamish Friedlander
328467f1b5 FIX: ConfirmedPasswordField used to expose existing hash 2013-06-20 14:09:30 +12:00
Kirk Mayo
dff5447cbc BUG: Fix for Cookie expiry timeout being passed as a large number on 64 bit machines 2013-06-20 12:30:48 +12:00
Simon Welsh
ac729067cd Merge pull request #2124 from CheeseSucker/patch-4
MINOR: Fixed typo
2013-06-19 13:22:29 -07:00
Ryan Wachtl
0cf6b78b0e Update cli-script.php
Use DIRECTORY_SEPARATOR for cross platform
2013-06-19 10:12:42 -05:00
CheeseSucker
2ac3444675 MINOR: Fixed typo 2013-06-19 16:48:49 +02:00
Ingo Schommer
a4189a6744 Merge pull request #2117 from ohararyan/3.1
FIX make sure select dropdowns in add page dialog aren't cut off
2013-06-19 05:30:54 -07:00
Ingo Schommer
8769da5622 CMS UI: Resize iframe alongside dialog
Fixes regression from 9f600ada2c
2013-06-19 14:28:34 +02:00
Ingo Schommer
2160fb8000 Merge remote-tracking branch 'origin/3.0' into 3.1
Conflicts:
	admin/javascript/LeftAndMain.js
	tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php
	tests/control/ControllerTest.php
2013-06-19 14:03:43 +02:00
Ingo Schommer
c5a7193896 Environment Config: SS_DATABASE_MEMORY 2013-06-19 13:42:28 +02:00
Ingo Schommer
5c3809a165 Merge pull request #2121 from sminnee/allowed-actions-templates
FIX: Ensure that actions inferred from templates with the "_action" suff...
2013-06-19 02:16:37 -07:00
Simon Welsh
d774bab988 REGRESSION: fixed background color for PaddedImage 2013-06-19 20:35:24 +12:00
Ingo Schommer
b7a00eea78 Merge pull request #2122 from g4b0/1752-image-manipulation-parameter-regression
REGRESSION: fixed background color for PaddedImage
2013-06-19 01:25:44 -07:00
g4b0
c06a9095df REGRESSION: fixed background color for PaddedImage 2013-06-19 10:19:54 +02:00
Sam Minnee
526b40414a FIX: Ensure that actions inferred from templates with the "_action" suffix also respect allowed_actions.
FIX: Ensure SSViewer::hasTemplate() is aware of themes.

To do this, RequestHandler::definingClassForAction() has been created, splitting out the code that looks up the class that defines a given action into its own method.  This is then overridden in Controller to look at templates.
2013-06-19 20:11:50 +12:00
Ryan Wachtl
7a3fcfc839 Missing directory separators in output of suggested _ss_environment paths 2013-06-19 00:52:12 -05:00
Sam Minnée
34287895ef Merge pull request #2099 from chillu/pulls/insert-media-tweaks
Various "Insert Media" dialog tweaks
2013-06-18 21:32:00 -07:00
Sam Minnée
31a138b636 Merge pull request #2093 from chillu/pulls/resize-infinite
BUG Resize infinite loops in IE8 (fixes #575)
2013-06-18 21:25:57 -07:00
Sam Minnée
211a3e4e77 Merge pull request #2116 from chillu/pulls/sapphiretest-env-type
Enforce 'dev' environment for test runs
2013-06-18 21:24:37 -07:00
Ryan O'Hara
36d9563da8 FIX make sure select dropdowns in add page dialog aren't cut off due to .parent-mode class having overflow:auto 2013-06-19 11:27:22 +12:00
Ingo Schommer
0da70dafa4 Enforce 'dev' environment for test runs
Otherwise tests like ControllerTest will fail because Deprecation notices
2013-06-19 00:13:02 +02:00
Sam Minnée
8bf4d417c6 Merge pull request #2094 from chillu/pulls/dialog-sizing
Min/max constraints for CMS dialog
2013-06-18 14:56:41 -07:00
Sean Harvey
726e4c313e Merge pull request #2084 from chillu/pulls/cmsform
Handle ValidationException on CMS forms
2013-06-18 14:41:51 -07:00
Ingo Schommer
1d402dd513 Unset test state in DirectorTest
This broke RSSFeedTest when running through 'sake'
2013-06-18 23:24:22 +02:00
Ingo Schommer
4ef83a2895 Using Cookie class in Session::destroy()
It allows us to suppress "headers sent" errors, which is particularly
important in phpunit test runs.
2013-06-18 23:06:22 +02:00
Ingo Schommer
690f1c1570 BUG Manually require SS_DAG in Core.php
Avoids errors when manifest needs to be built,
e.g. after faulty test runs. SS_DAG is depended on by ConfigManifest.
2013-06-18 23:00:32 +02:00
Simon Welsh
05b6fd3536 Merge pull request #2114 from jthomerson/fix_minor_typos
MINOR: fix a couple minor typos
2013-06-18 13:17:48 -07:00
Jeremy Thomerson
6f16034ac8 MINOR: fix a couple minor typos 2013-06-18 18:28:46 +00:00
Ingo Schommer
4acbfdc846 Merge pull request #2061 from jthomerson/enhancement_3.1_allow_overridable_minification
ENHANCEMENT: allow overridable JS/CSS minification
2013-06-18 11:04:07 -07:00
Ingo Schommer
19e8f8f249 Merge pull request #2111 from CheeseSucker/patch-4
Consolidated command line examples
2013-06-18 10:48:31 -07:00
CheeseSucker
671b7a0cc7 Consolidated command line examples
Examples were broken into several <pre> blocks.
2013-06-18 15:50:32 +03:00
Ingo Schommer
ff26491918 Merge pull request #2107 from vikas-srivastava/patch-1
Update 3.1.0.md
2013-06-17 02:49:02 -07:00
vikas srivastava
2f16d93d48 Update 3.1.0.md
I was trying 
Member:
  extensions:
    MyMemberExtension

And it didn't work then someone on IRC pointed that I need to put a '-' before values. So this works.
Member:
  extensions:
    - MyMemberExtension
Hope will help someone else.
2013-06-17 14:21:46 +05:30
Ingo Schommer
04c337dc82 Tab breadcrumbs floating (regression from #1778) 2013-06-17 01:26:04 +02:00
Will Rossiter
3fb80a1657 Merge pull request #2104 from CheeseSucker/patch-1
A few minor improvements to the "Module development" documentation
2013-06-16 03:30:10 -07:00
CheeseSucker
476df739a2 A few minor improvements to the "Module development" documentation 2013-06-16 12:55:39 +03:00
Jeremy Thomerson
964b3f2d48 FIX: <% if Link %> wasn't working
Since ViewableData was returning a casting helper for Link, but DataObject was
only using $this->$fieldname to set values on that casting helper, you could
not use <% if Link %> (or <% if $Link %>) in your templates because Link is not
a field, and thus had no value to be set on the casting helper, causing
hasValue to think that there was no value.  Since DataObject->dbObject says that
"it only matches fields and not methods", it seems safe to have it call db(..)
to get the field spec, and not call ViewableData->castingHelper at all.
2013-06-15 13:44:03 +00:00
Ingo Schommer
939773643a Accessibility: Open main tabs by keyboard focus
Regression caused by jQuery UI 1.9 upgrae
2013-06-15 12:23:51 +02:00