Breaking: The contract field "publish" has been removed
See also
Upgrading from 2.4 to 3.0 is the order in which the 3.0 changes have to be applied.
Description
A contract had a toggle Show this contract online?, stored in the
column
publish
of
tx_. No
public view has ever read it: a contract whose toggle was off was shown like
any other. Contracts have a visibility that works, their
hidden
field.
Every public view leaves a hidden contract out, the frontend editor shows and
hides a contract with the hide action of its row, and
Show hidden records of the selected contracts element keeps
showing hidden contracts where an internal directory needs them.
The second switch is removed:
- the column
publishfromext_tables.sql, - the TCA column and its place in the
generalpalette, \FGTCLB\withAcademic Persons\ Domain\ Model\ Contract::$publish set,Publish () isandPublish () get,Publish () - the contract field
publishofConfiguration/,Academic Persons/ Settings. yaml - the labels
tx_ofacademicpersons_ domain_ model_ contract. columns. publish. label locallang_andtca. xlf helptext.ofcontracts. publish locallang..xlf
fgtclb/academic-persons-edit removes the switch from its contract form in the same release.
Impact
Nothing that is rendered changes. The flag had no effect, and the visibility of every contract stays as it is.
Code of a project that used the flag breaks:
- Calling
set,Publish () isorPublish () geton a contract is a fatal error, for example in an importer that creates contracts.Publish () - A template that reads
{contract.gets an empty value, so a condition on it is false for every contract.publish} - A query that selects or filters
publishfails once the column is dropped. - A
Datadata map that writesHandler publishloses the value without an error, since the column is not in the TCA any more. - A site package that copied the settings map before 3.0 still names
contracts.. The field is left out of the frontend editor, and a warning in the log names the key to remove. It is logged when the settings are built again, for example after the caches were flushed. Afields. publish managedmap that listsFields publishforcontractsis refused with the error of any name that is not a field ofcontracts..fields
The database analyzer offers the column for removal. It never drops it on its own.
Affected Installations
Installations whose own code reads or writes the contract field
publish
, through the model, a query, a
Data data map, a
template, the settings or a TCA override.
Migration
Use the visibility of the contract instead:
set and
get of the model,
hidden
in a query or a data map.
A project whose own code gave the flag a meaning, and hid contracts that were
not published, carries it over with the upgrade wizard
academic before the column is
dropped. The wizard is not registered by default, since on every other
installation it would hide all contracts. How to register and run it is
described in Important: The contract publish wizard has to be registered by hand.
A project that never gave the flag a meaning has nothing to migrate. It removes what it wrote for the flag, such as a TCA default, a model property of its own or the value its importer sets, and lets the analyzer drop the column.
Remove contracts. from the
Configuration/ of the site package, and
publish from a managed map.