Upgrading from 2.4 to 3.0
Version 3.0 of academic_projects runs on TYPO3 13 and 14 only. The
project page renders inside the layout of the site and carries its content
itself, so the content load set of 2.4 is gone. The department category type of
this extension is renamed to project_, the templates carry speaking
classes in place of the classes of a theme, the icons are replaced, and the
controller is final. Work through the sections in order. Skip a step that does
not apply to the installation.
Before you start
Version 3.0 runs on TYPO3 13.4 from 13.4.35 on and on TYPO3 14.3 from 14.3.7 on, with PHP 8.2 or later.
academic_projects 3.0 needs these packages. Upgrade them first or in the same deployment, in this order:
- fgtclb/environment-state-manager 2.x, which academic_base 3.0 requires in place of 1.x. Composer updates it on its own. A classic installation updates environment_state_manager before it updates academic_base.
- fgtclb/academic-base 3.0, the same release as this extension.
- fgtclb/category-types 3.0, the same release as this extension.
These changes have to ship in the same deployment as the update, because a site, a request or a command fails until they are made:
- A site that depends on
fgtclb/answers every page with HTTP 500, see Remove the content load set.academic- projects- content- load - A
Configuration/of the site package that changes or declares the typeCategory Types. yaml departmentof the groupprojectsstops TYPO3 while it loads the category types, see Rename the department category type. - A subclass or an XCLASS of the project controller stops with a fatal error, and so does code that names the renamed sorting constant, see Adapt your code.
The module paths on this page are those of TYPO3 13, where the upgrade runs.
Update TYPO3 first
Update TYPO3 to 13.4.35 or later while the site still runs 2.4, which supports TYPO3 13.4. Version 3.0 no longer installs on TYPO3 12, and Composer and the Extension Manager refuse it next to an older patch release of TYPO3 13.
Stay on TYPO3 13 until the upgrade is complete. The content element wizard
academic of this extension reads the column
tt_, which TYPO3 14 removes, so it only runs on
TYPO3 13. The same holds for the content element wizards of
academic_jobs, academic_persons and
academic_persons_edit when the installation also has them. Move to
TYPO3 14.3.7 or later once they have run.
See Breaking: Removed TYPO3 v12 support and Important: TYPO3 13.4.35 or 14.3.7 is required.
Update the package
composer require -W \
'fgtclb/academic-base':'~3.0.0' \
'fgtclb/category-types':'~3.0.0' \
'fgtclb/academic-projects':'~3.0.0'
On a classic installation, update environment_state_manager to 2.x
from the TER in Admin Tools > Extensions first, then update
academic_base, category_types and
academic_projects there, in this order. Run the commands of this
page with
typo3/ instead of
vendor/.
vendor/bin/typo3 cache:flush
Update the database
vendor/bin/typo3 extension:setup
Or apply the changes in Admin Tools > Maintenance > Analyze Database Structure.
This extension changes no column in 3.0. The comparison applies the changes of the index definitions TYPO3 13.4.35 and 14.3.7 bring.
Run the upgrade wizards
-
academic, Migrate academic_projects plugins from "list_type" to "CType"., on TYPO3 13, before the site moves to TYPO3 14. It turns the Insert plugin content elements of the pluginsProjects_ plugin Upgrade Wizard academicprojects_andprojectlist academicprojects_into content elements of the type of the same name, and it readsprojectlistsingle tt_, which TYPO3 14 no longer has. See Breaking: Extbase plugins require CType on TYPO3 v14.content. list_ type vendor/bin/typo3 upgrade:run academicProjects_pluginUpgradeWizardCopied!An installation that ran it with 2.4 has nothing left to migrate, and TYPO3 offers it only while an element of the old shape is left. Do not postpone it to TYPO3 14: once the database comparison of TYPO3 14 has removed the column, the wizard finds nothing to do and is recorded as done, and nothing records any more which plugin such a content element was. Configuration of the site that matches these plugins on
list_matches ontype CTypeinstead.
A wizard that TYPO3 recorded as done is offered again once it is marked
undone. TYPO3 13 marks a wizard undone with
vendor/.
Version 3.0 adds no upgrade wizard for this extension. The department category type is moved by a console command, see Rename the department category type.
Adapt the configuration
The upgrade check
The console command
academic: of academic_base
reads the stored configuration of the installation and reports what no longer
reaches the academic extensions. For this extension it reports a dependency on
the removed content load set and an XCLASS of the controller, but neither a
subclass that is registered another way nor the category type file. Run it on
the staging copy right after the package update, and fix what it reports
before the deployment:
vendor/bin/typo3 academic:upgrade:check
With the extension key and a site it also compares the override folders of the site with the shipped files and reports an override of a file the extension no longer ships:
vendor/bin/typo3 academic:upgrade:check academic_projects --site=<site identifier>
Each finding, and what to do about it, is described in the fgtclb/academic-base:upgrade-check of academic_base.
Remove the content load set
The project page renders the content of its main column from the variable
project of its own page object now. The set
fgtclb/, its static template
Academic Projects: Content load override (academic_projects) and
the file Configuration/TypoScript/ContentLoad/setup.typoscript are
removed, and no academic extension defines
styles. any more. See
Breaking: Project pages render their content without a global path.
- Remove
fgtclb/from theacademic- projects- content- load dependenciesof every site configuration and of every set of the site package, in the same deployment as the update. A site that depends on the aggregatefgtclb/needs no change.academic- projects - Remove the static template Academic Projects: Content load
override (academic_projects) from every
sys_record, and antemplate @importof the removed file from the site package. - Move a customisation of
styles.that was meant for project pages tocontent. get Content page., inside the condition on the project page type, see The content of a project page.10. variables. project Content -
A template of the site package that renders
styles.defines the object itself:content. get Content styles.content.getContent < styles.content.get styles.content.getContent.select.where = {#colPos}=0Copied!
academic: reports a site that depends on the removed set as
unavailable-, the removed static template as
static- and an import of the removed file as
typoscript-.
Rename the department category type
The department type of this extension is project_ now, because
academic_programs declares a type department as well and a
category stores its type without the group. Its label key and its icon
identifier follow. See
Breaking: The projects department type is renamed.
- Replace
departmentwithproject_in everydepartment Configuration/of the site that changes or removes the type of the groupCategory Types. yaml projects, in the same deployment as the update. Not before it: 2.4 has noproject_to change.department -
After the update and the cache flush, move the stored categories:
vendor/bin/typo3 academic:projects:department:migrateCopied!The command lists the categories it cannot decide on. Open each of them in the backend and set its type. It can be run again. A site that removed the projects department in its
Categorydoes not run it.Types. yaml - Replace
departmentwithproject_indepartment plugin.and in the templates of the site. Search the site package fortx_ academicprojects. filter. category Types sys_andcategory. projects. department category_as well.types. projects. department - Flush the page cache.
Check own route enhancers
The project lists answer a filter submission with a redirect to a URL that
carries the selection. A route enhancer of the site for these plugins must not
declare
defaults
for the sorting: the redirect for the default sorting
would otherwise end on the page URL without arguments, where the preset of the
content element applies again. Remove such
defaults
, or import the
enhancers of Configuration/ instead, see
Feature: Project filter selections have a URL and Feature: Route enhancers for the project lists.
Adapt templates and assets
Style the new markup
The templates of this extension carry speaking classes now, such as ace-,
ace-, ace-, ace- and ace-, in place of the card,
list group and utility classes of a theme. The extension ships no styles for
them. Move the selectors of the site stylesheet from the old classes to the new
ones, the changelog entry lists them side by side, see
Breaking: Project templates carry speaking classes. Styling shows the
markup of every view and links the stylesheet partial the development instances
of the academic extensions use, An example.
The images of the project list and the project page render as a
<picture>
through the image partial of academic_base. CSS
that selects the image as a direct child of its container adjusts to the
wrapper. A plugin view whose partial root paths the site replaced completely
needs the path of academic_base below its own:
plugin.tx_academicprojects.view.partialRootPaths {
-1 = EXT:academic_base/Resources/Private/Partials/
}
Replace the icons
The project page type and the two content elements have icons of their own,
tx- and
tx-, in place of the core icon
actions-. CSS that addressed them through that identifier names
the new one. The category type icons keep their identifiers, but are new
drawings from new files and render as an inline
<svg>
in the frontend,
so CSS that addressed an
<img>
addresses the
<svg>
now, and a
path to a file below Resources/ points at the
new file. See
Breaking: Project icons are replaced and follow the colour scheme and
Important: Category type icons come from the frontend icon registry.
Render project pages in the site layout
The page template of the project page type renders the section
Main
of
the layout Default of the site package, through five partials below
Project/. A project page shows the header, the navigation and the
footer of the site now. See
Breaking: Project pages render inside the site layout.
- A site package whose layout for project pages has another name sets
plugin., see The layout of a project page.tx_ academicprojects. page. layout - An override of
Pages/made to change one part moves that change to the matching partial belowAcademic Project. html Project/, see The parts of a project page, and the override goes.Page/ - A path the site set at the key
100inside the condition on the project page type moves to50, or to a key above it to win over the extension.
Compare template overrides
Version 3.0 changes these templates and partials. A copy of one of them in a
site package keeps rendering the copy, so compare each copy with the shipped
file and take over the changes, see Overriding templates. The paths below
are relative to Resources/:
| File | What changed | Entry |
|---|---|---|
Pages/ | Renders the layout of the site and the partials below
Project/, and the content from
{project in place of
styles.. | Render project pages in the site layout, Remove the content load set |
Templates/ | Renders the header of the content element while
render is switched on. | Feature: The project lists can render the content element header |
Partials/ | Renders the new partials Project/ and
Project/. | Feature: Active filter tags, a reset link and a result count |
Partials/ | Renders the image through Academic/ of
academic_base, the category icons with the
ab: ViewHelper, the title of an own category type, and
the state of the project when the content element asks for it. | Style the new markup, Replace the icons, Feature: Own category types are named by their title, Feature: The state of a project on its card |
Partials/ | Labels an own category type by its title. | Feature: Own category types are named by their title |
Partials/ | Takes the class of the heading as
class
in place of
position. | Style the new markup |
Every file above, and
Partials/,
Partials/,
Partials/ | Speaking classes in place of the classes of a theme. | Style the new markup |
The upgrade check with the extension key and a site reports an override of a file the extension no longer ships, see The upgrade check.
Adapt your code
\FGTCLB\is final. A subclass, and an XCLASS of it, stop with a fatal error. Remove them, and theAcademic Projects\ Controller\ Project Controller configurecall or the XCLASS registration that points at them, in the same deployment as the update. Move what they did to a listener of the project events, see Breaking: The project controller is final and For developers.Plugin () Sortingis renamed toOptions:: SORT_ BY_ STARTDATE_ desc Sorting, without an alias. Its value and every stored sorting stay as they are. See Breaking: The descending start date constant is renamed.Options:: SORT_ BY_ STARTDATE_ DESC
Check the result
- The upgrade check exits with
0, without and with the extension key, see The upgrade check. Run it again after each configuration step, and in the deployment pipeline. - The content elements are offered as Projects and Selected Projects now, see Important: Content elements have new titles and descriptions.
- Every page of a site answers, none with HTTP 500.
vendor/lists no category left to decide on.bin/ typo3 academic: projects: department: migrate - A project page renders inside the layout of the site, with its content and its categories, the department among them.
- The project lists look as the site intends, with the speaking classes, and their department filter offers the departments of projects only.
- A list keeps its preset categories of the category types its filter does not offer, see Important: A filter keeps the preset categories of other types.