Skip to content

Commit

Permalink
Merge pull request #365 from creative-commoners/pulls/4.13/api-links
Browse files Browse the repository at this point in the history
DOC Fix API links on fluent upgrade page
  • Loading branch information
sabina-talipova authored Oct 9, 2023
2 parents 294d9a2 + 09c1df4 commit 6f13d94
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions en/03_Upgrading/07_Upgrading_Fluent.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ The following actions in the history tab in the CMS are affected:

### Standard Versioned methods

Fluent 6 alters how many of the [`Versioned`](api:SilverStripe/Versioned/Versioned) methods work as the data source is changed to use the localised tables. This has a large impact on the CMS UI and behaviour (as mentioned in the previous section).
Fluent 6 alters how many of the [`Versioned`](api:SilverStripe\Versioned\Versioned) methods work as the data source is changed to use the localised tables. This has a large impact on the CMS UI and behaviour (as mentioned in the previous section).

Examples of impacted methods:

- [`isOnDraft()`](api:SilverStripe/Versioned/Versioned::isOnDraft())
- [`isPublished()`](api:SilverStripe/Versioned/Versioned::isPublished())
- [`isArchived()`](api:SilverStripe/Versioned/Versioned::isArchived())
- [`stagesDiffer()`](api:SilverStripe/Versioned/Versioned::stagesDiffer())
- [`isOnDraft()`](api:SilverStripe\Versioned\Versioned::isOnDraft())
- [`isPublished()`](api:SilverStripe\Versioned\Versioned::isPublished())
- [`isArchived()`](api:SilverStripe\Versioned\Versioned::isArchived())
- [`stagesDiffer()`](api:SilverStripe\Versioned\Versioned::stagesDiffer())

Simply put, any code you have checking the versioned state of a record used to return results for the base (unlocalised) record. To get the result for the localised record, specialised methods had to be called.

Expand Down Expand Up @@ -243,9 +243,9 @@ These changes aren't likely to break anything in your project, but we recommend
Some unit tests may break. There's no one solution for problems you may encounter, but some general recommendations that might help are:

- avoid localised tables in yaml fixtures
- localise models in your PHP code instead, either in the `setUp()` method or via ORM calls (for example explicitly calling [`$obj->write()`](api:SilverStripe/ORM/DataObject::write()) after fetching the fixture object)
- localise models in your PHP code instead, either in the `setUp()` method or via ORM calls (for example explicitly calling [`$obj->write()`](api:SilverStripe\ORM\DataObject::write()) after fetching the fixture object)
- avoid including version history in your yaml fixtures
- use ORM methods like [`$obj->publishRecursive()`](api:SilverStripe/Versioned/RecursivePublishable:publishRecursive()) after fetching the fixture objects instead
- use ORM methods like [`$obj->publishRecursive()`](api:SilverStripe\Versioned\RecursivePublishable:publishRecursive()) after fetching the fixture objects instead

## Further reading

Expand Down

0 comments on commit 6f13d94

Please sign in to comment.