Commit Graph

22701 Commits

Author SHA1 Message Date
Steve Boyd
a3df66860f Merge branch '4.8' into 4 2021-05-31 17:05:11 +12:00
Steve Boyd
9ccdb8efb2 Merge branch '4.7' into 4.8 2021-05-31 17:04:54 +12:00
Maxime Rainville
472fc4ebb4
BUG Update DataQuery::exists to return false when limit causes no result to be returned (#9946)
* BUG Update DataQuery::exists to return false when limit causes no result to be returned

* Update comment

* Fixing linting issue
2021-05-31 16:50:58 +12:00
Aaron Carlino
44c30aea2d
META: Publish docs on updates to 3 branch, not 3.7 2021-05-31 14:18:16 +12:00
Ingo Schommer
196752566f
Merge pull request #9655 from sminnee/pulls/9647-find-lost-records
NEW: Add GridFieldDetailForm::setRedirectMissingRecords()
2021-05-21 13:53:18 +12:00
Sam Minnee
8883413ba7 NEW: Add GridFieldDetailForm::setRedirectMissingRecords()
This new opt-in setting will let grid field detail forms redirect to the
“Correct” URL of a GridField if it’s not found in the current list.

This works by:
 * Looking for the item in the database
 * If it exists, check for a CMSEditLink() method that returns a value
 * If so, redirect to that

This is useful if you have a number of grid fields that each show a
partial list of records, and it’s possible for the user to make changes
such the item no longer appears in the list, but does appear in another
list.

It’s an opt-in feature as I think all changes like this should be
opt-in, based on previous experiences improving GridField and in turn
breaking SecurityAdmin and slowing versioned-data-browsing down. ;-)
2021-05-21 13:16:00 +12:00
Ingo Schommer
cd71f964cf
Merge pull request #9929 from open-sausages/pulls/4/csvbulkloader-extension-hooks
Extension hooks for CsvBulkLoader
2021-05-21 11:48:56 +12:00
Ingo Schommer
8c0efd3980 Extension hooks for CsvBulkLoader
Required for versioned-snapshots integration
2021-05-21 11:17:46 +12:00
Ingo Schommer
ad4e488dcf
Merge pull request #9192 from sminnee/fix-9163
NEW: Support dot syntax in form field names
2021-05-21 10:34:15 +12:00
Ingo Schommer
8c9e203f1e DOCS 4.9.0 changelog with dot notation changes
[ci-skip]
2021-05-21 10:32:51 +12:00
Dylan Wagstaff
a5fc61a23a
Merge pull request #9948 from open-sausages/4
FIX Tidy extension and cli fix for tests
2021-05-21 09:19:22 +12:00
Guy Marriott
766df06f23
Merge pull request #9631 from open-sausages/pulls/4/custom-sort-gridfield-autocompleter 2021-05-20 14:02:44 -07:00
Ingo Schommer
7a0d354529 Linter fixes 2021-05-21 08:30:43 +12:00
Ingo Schommer
99c56fc913 DOC Handling nested form data
Related to #9163
2021-05-20 20:32:27 +12:00
Ingo Schommer
8806b3befc Fixes required for dot notation support in fields
See #9163
2021-05-20 20:32:25 +12:00
Dan Hensby
23ffd2bbd6 Linting fix 2021-05-20 20:32:25 +12:00
Sam Minnee
5dcf5197da FIX: Make the ./_ substitution optional. 2021-05-20 20:32:25 +12:00
Sam Minnee
c7c6bdebdf FIX: Allow join-object to be referenced as a component
This avoids having arbitrary differences between a join object and a
has-one relation.
2021-05-20 20:32:25 +12:00
Sam Minnee
6ba7bf7b2f FIX: Replace ‘.’s with ‘_’s in HTML IDs
The functioning of dot-syntax in form fields mean that .s are more
likely to appear in names. This breaks javascript behaviour in HTML IDs 
and I believe is an invalid character for them.
2021-05-20 20:32:24 +12:00
Sam Minnee
02fb7c3b17 NEW: Support dot syntax in form field names
This change adds support for these in a few places.

 - Form::saveInto($record)
 - Form::loadDataForm($record)
 - Form::loadDataForm($_POST)

Fixes https://github.com/silverstripe/silverstripe-framework/issues/9163
2021-05-20 20:32:24 +12:00
Ingo Schommer
5e2ca7f0a3 FIX Tidy extension and cli fix for tests
Wrap doesn't actually wrap in the tidy extension.
This causes tests to be flakey, for example some of `FormTest` fails
if you happen to have `ext-tidy` installed (which is the default on most systems).
This happened to me on PHP 7.4.19 with tidy 5.6.0 (OSX Homebrew).
Note that the tests aren't failing in Travis right now.

You'd expect `wrap => 0` to be honoured. It's documented as an integer
in the tidy docs: https://api.html-tidy.org/tidy/quickref_5.6.0.html#wrap.

Even tracked this down to the PHP source which appears to be doing the right thing:
https://github.com/php/php-src/blob/master/ext/tidy/tidy.c#L300

There's a bug from 2018 against PHP 7.2.8 which was closed as "not a bug" without comment:
https://bugs.php.net/bug.php?id=76683

You can see the behaviour in action in the following test.

```
<?php
$html = '<p>a really long string which should not be wrapped</p>';

echo "## With tidy extension" . PHP_EOL;
$tidy = new tidy();
$tidy->parseString(
    $html,
    [
        'output-xhtml' => true,
        'numeric-entities' => true,
        'wrap' => 0,
    ],
    'utf8'
);
$tidy->cleanRepair();
echo $tidy . PHP_EOL;

echo "## With tidy cli" . PHP_EOL;
$cmd = sprintf("echo " . escapeshellarg($html) . " | tidy --force-output 1 -n -q -utf8 -asxhtml -w 0 2> /dev/null");
echo shell_exec($cmd);
```

Long story short, setting it to 99999 fixes the issue.
2021-05-20 20:09:42 +12:00
Daniel Hensby
713a0b4a67
Merge pull request #9947 from chromos33/4
Update 04_Shortcodes.md
2021-05-19 19:24:31 +01:00
chromos33
ebdbbfd595
Update 04_Shortcodes.md 2021-05-19 19:16:27 +02:00
Steve Boyd
b6286983b1 Merge branch '4.8' into 4 2021-05-17 16:54:02 +12:00
Steve Boyd
787253d51c MNT Remove COMPOSER_ROOT_VERSION 2021-05-17 16:53:40 +12:00
Andre Kiste
6fd3a1aa05
Merge pull request #9944 from manuth/patch-16
Update 09_Casting.md
2021-05-17 15:57:23 +12:00
Andre Kiste
cb05744b7d
Merge pull request #9941 from manuth/patch-13
Update 03_Requirements.md
2021-05-17 15:26:50 +12:00
Andre Kiste
d7225f99fd
Merge pull request #9942 from manuth/patch-14
Update 05_Template_Inheritance.md
2021-05-17 15:26:25 +12:00
Andre Kiste
ee334025f0
Merge pull request #9943 from manuth/patch-15
Update 06_Themes.md
2021-05-17 15:25:19 +12:00
Steve Boyd
8b28c5647b MNT Added 4.8.0-rc1 changelog 2021-05-17 12:05:10 +12:00
Andre Kiste
7b57963182
Merge pull request #9938 from manuth/patch-10
Update index.md
2021-05-17 11:57:38 +12:00
Andre Kiste
1310252c7d
Merge pull request #9940 from manuth/patch-12
Update 02_Common_Variables.md
2021-05-17 11:51:24 +12:00
Andre Kiste
e98b7edc3e
Merge pull request #9939 from manuth/patch-11
Update 01_Syntax.md
2021-05-17 11:50:39 +12:00
Manuel Thalmann
3a49759c0f
Update 09_Casting.md 2021-05-17 01:34:01 +02:00
Manuel Thalmann
293f7e9d05
Update 06_Themes.md 2021-05-17 01:03:03 +02:00
Steve Boyd
dde1e7a5c2 Update translations 2021-05-17 10:53:21 +12:00
Manuel Thalmann
0d649e0dd8
Update 05_Template_Inheritance.md 2021-05-17 00:42:25 +02:00
Manuel Thalmann
deb767d9fc
Update 03_Requirements.md 2021-05-17 00:12:01 +02:00
Manuel Thalmann
64d569ee02
Update 02_Common_Variables.md 2021-05-16 22:22:53 +02:00
Manuel Thalmann
a1ace42294
Update 01_Syntax.md 2021-05-16 21:52:20 +02:00
Manuel Thalmann
c3ff7a417b
Update index.md 2021-05-16 20:52:27 +02:00
Daniel Hensby
1c1298e062
Merge pull request #9934 from manuth/patch-7
Update 11_Scaffolding.md
2021-05-14 20:57:56 +01:00
Daniel Hensby
045eaaaa79
Merge pull request #9933 from manuth/patch-6
Update 10_Versioning.md
2021-05-14 20:51:08 +01:00
Daniel Hensby
d3e1678823
Merge pull request #9935 from manuth/patch-8
Update Dynamic_Default_Fields.md
2021-05-14 20:23:26 +01:00
Manuel Thalmann
4f57bd94de
Apply further suggestion
Co-authored-by: Daniel Hensby <dhensby@users.noreply.github.com>
2021-05-14 20:22:23 +01:00
Manuel Thalmann
e37188da4c
Revert unnecessary change 2021-05-14 20:21:34 +01:00
Daniel Hensby
414a9e4ce2
Merge pull request #9936 from manuth/patch-9
Update Grouping_DataObject_Sets.md
2021-05-14 20:16:48 +01:00
Manuel Thalmann
4de89323f7
Update Grouping_DataObject_Sets.md 2021-05-14 15:43:44 +02:00
Manuel Thalmann
42f0957bd5
Update Dynamic_Default_Fields.md 2021-05-14 15:29:11 +02:00
Manuel Thalmann
ff7654db1f
Update 11_Scaffolding.md 2021-05-14 15:17:50 +02:00