---
title: "Breaking: The contract field \"publish\" has been removed"
manual: "Academic Profiles"
version: "main"
source: "Changelog/3.0/Breaking-ContractPublishFieldRemoved.rst"
rendered: "2026-10-02T20:47:49+00:00"
---

# Breaking: The contract field "publish" has been removed {#breaking-contract-publish-field-removed}

> [!NOTE]
> **See also**
>
> [Upgrading from 2.4 to 3.0.0](../../Upgrade/Index.html#upgrade) is the order in which the 3.0 changes have to be applied.

## Description {#description}

A contract had a toggle **Show this contract online?**, stored in the
column `publish` of `tx_academicpersons_domain_model_contract`. 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 `publish` from `ext_tables.sql`,
-   the TCA column and its place in the `general` palette,
-   `\FGTCLB\AcademicPersons\Domain\Model\Contract::$publish` with
    `setPublish()`, `isPublish()` and `getPublish()`,
-   the contract field `publish` of
    `Configuration/AcademicPersons/Settings.yaml`,
-   the labels `tx_academicpersons_domain_model_contract.columns.publish.label`
    of `locallang_tca.xlf` and `helptext.contracts.publish` of
    `locallang.xlf`.

[`fgtclb/academic-persons-edit`](https://packagist.org/packages/fgtclb/academic-persons-edit) removes the switch from its contract
form in the same release.

## Impact {#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 `setPublish()`, `isPublish()` or `getPublish()` on a
    contract is a fatal error, for example in an importer that creates
    contracts.
-   A template that reads `{contract.publish}` gets an empty value, so a
    condition on it is false for every contract.
-   A query that selects or filters `publish` fails once the column is
    dropped.
-   A `DataHandler` data map that writes `publish` loses 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.fields.publish`. 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. A
    `managedFields` map that lists `publish` for `contracts` is refused
    with the error of any name that is not a field of `contracts.fields`.

The database analyzer offers the column for removal. It never drops it on its
own.

## Affected Installations {#affected-installations}

Installations whose own code reads or writes the contract field
`publish`, through the model, a query, a `DataHandler` data map, a
template, the settings or a TCA override.

## Migration {#migration}

Use the visibility of the contract instead: `setHidden()` and
`getHidden()` 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
`academicPersons_migrateContractPublishToHidden` 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](Important-ContractPublishToHiddenWizard.html#important-contract-publish-to-hidden-wizard).

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.fields.publish` from the
`Configuration/AcademicPersons/Settings.yaml` of the site package, and
`publish` from a `managedFields` map.
