# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.16.0] - 2019-12-17
### Fixed
- Fixed articles not being part of the sitemap

## [1.15.0] - 2019-12-05
### Added
- Adjust poi opening-times-line-preview for changes in opening times parser (add rendering of "always open" and "opened over night")
- Use new ToubizLegacyAttractionParser for new opening times format 'legacy-attraction'

### Action required
- Reminder that the following node types are marked as deprecated (read more on the [1.13.0] entry). They will be disabled by default in 1.14 (forcing projects that use them to explicitly opt-in) and completely removed in 1.17. The old node types can be replaced with the `Newland.Toubiz.Poi.Neos:FilteredTeaserList` node type.
    - `Newland.Toubiz.Poi.Neos:FilteredLists`: The overview page for articles.
    - `Newland.Toubiz.Poi.Neos:TeaserList`: The regular teaser list.

## [1.14.5] - 2019-11-20
### Added
- Added missing list item templates for lodgings, direct marketers, congress locations and cities.

### Fixed
- Fixed direct marketer service filters not finding any results.
- Fixed canonical URL in POI detail views pointing to the home page.
    - Please ensure that you are using the new `Newland.NeosMetaTags:CanonicalLink` in your page fusion.
- `preselectedCities` on a city list now filters by id instead of by zip code.
- Progressbar when regenerating all article urls now has a correct maximum value.
- Abstracts for Cities now use raw formatting.

### Changed
- POI Items now show the POI Category instead of the filter item name if available.
- Grid teasers now display their article type.


## [1.14.4] - 2019-10-02
### Added
- Static map size & zoom can now be controlled using the following options:
    - `Newland.Toubiz.Poi.Nenos.staticMap.width`
    - `Newland.Toubiz.Poi.Nenos.staticMap.height`
    - `Newland.Toubiz.Poi.Nenos.staticMap.zoom`

### Fixed
- EntityLists on city detail pages now also query for city relation instead of zip codes.
- Fixed OutdoorActive GPX & KML download links missing API credentials
- Fixed Automatic ZIP resolution (e.g. for used OA-Tours) not preserving zip codes that have been
  resolved previously, overwriting them with an empty string.

## [1.14.2] - 2019-09-19
### Fixed
- Fixed controller incorrectly referencing old configuration `integrationType`.

## [1.14.0] - 2019-09-17
### Added
- Static maps on article detail pages can now be configured to use toursprung / MTK maps.
- Star ratings are now displayed using their own custom badges

### Changed
- With the implementation of Toubiz Tours we have new types of tours. The filtering for tours now 
have 3 different types of Filtering. One with all types, Outdoor Active and Toubiz Tours, 
and one individual for Toubiz or Outdoor Active. They can be configured by overriding the property like so:
```yaml
Newland:
  Toubiz:
    Poi:
      Neos:
        filter:
          articleType:
            2:
              children:
                properties:
                  children:
                    tourType:
                      dataSourceArguments:
                        filterGroup: configured-type-of-tour
```
These new types are:
-- typesOfTourAll
-- typesOfTourOutdoorActive
-- typesOfTourToubiz

- Adjust existing `img` tags to use lazy loading.
- Link Lists are now available for multi-site configuration. Following the now usual structure you should
add the sitename to the structure. If no override is set, it will default 
to the one declared on the package.
```yaml
Newland.Toubiz.Poi.Neos:
    cityDetails:
      links:
        sites:
          # Custom override per site, all these can be customized per site
          radolfzell:
            data:
              restaurants:
                target: 'settings://Newland.Toubiz.Poi.Neos.linkTargets.clients.radolfzell.lists.1'
                labelId: restaurants
                type: article
                mainType: 1
                queryParameters:
                  city: 'city'
                  categories: 'categories'
                  articles: 'articles'
                queryParameter: 'city'
                iconClass: food
    linkTargets:
      sites:
        default:
          lists:
            0: 'node://a0829ac0-5a9a-4ad1-b7c5-fbb03a482ea6'
            1: 'node://4d8c8785-eae1-474a-9ecb-1775360246ab'
            2: 'node://6889fd78-f19c-4136-82a8-e62b94ee28fa'
            3: 'node://a2c4f0c5-003b-403d-9b6b-9c4b771e6c7b'
        radolfzell:
          lists:
            0: '...'
            1: '...'
            2: '...'
            3: '..'
```

### Fixed
- Pagination for lists loads as many new elements as there are elements on the page.
- Highlight lists will not display a headline if no articles can be rendered. This can happen when
  articles were not imported for some reason.

### Removed
- The `trackingOnly` configuration option for outdooractive keys has been removed as
  the outdooractive JS-SDK is now used for more features.
  This option is rarely used in projects and removing it has no impact on existing functionality.

### Action required
- The previous configuration `Newland.Toubiz.Poi.Neos.staticMap.apiKey` is no longer valid.
  Please check `README.md` for new configuration options.
- Link Lists are now available for multi-site configuration. Following the now usual structure you should
  add the sitename to the structure. If no override is set, it will default 
  to the one declared on the package.
  
```yaml
Newland.Toubiz.Poi.Neos:
    cityDetails:
      links:
        sites:
          # Custom override per site, all these can be customized per site
          radolfzell:
            data:
              restaurants:
                target: 'settings://Newland.Toubiz.Poi.Neos.linkTargets.clients.radolfzell.lists.1'
                labelId: restaurants
                type: article
                mainType: 1
                queryParameters:
                  city: 'city'
                  categories: 'categories'
                  articles: 'articles'
                queryParameter: 'city'
                iconClass: food
```
- You will need to add a configuration for OutdoorActive per site, this will allow to use multiple 
tracking on detail pages and in the Map component.
  
```yaml
Newland:
  Toubiz:
    Poi:
      Neos:
        outdoorActiveConfigurations:
          sites:
            newland-toubizfrontend:
              apiKey: 4PTZSGAC-EMWGKPGH-4OSSDFYE
              client: api-schwarzwald
              trackingOnly: false
            radolfzell:
              apiKey: xxxxxxxxxxxxx
              client: api-radolfzell
              trackingOnly: false
```


## [1.13.1] - 2019-08-13
### Added
- Filters for lodgings
- Filters for gastronomy
- Filter configuration for preselectedProperties in the backend
- Family attributes are now preselectable in backend

### Fixed
- Tags passed by query string are now rendered as hidden inputs.
- Filtered lists now have counts in their last slide again.
- City filter group options are now pre-populated by query string.

## [1.13.0] - 2019-08-01
### Added
- Position of gallery in city detail views can now be configured. Set 
  `Newland.Toubiz.Poi.Neos.cityDetails.gallery.insertAfterLinks` to true to show the gallery
  after the icon teaser links instead of below the tb-header.
- New `Newland.Toubiz.Poi.Neos:FilteredTeaserList` node type. It unifies the overview page functionality
  and regular teaser lists.
  
### Removed
- The following node types are being marked as deprecated in this release. They will be disabled by default in 1.14
  (forcing projects that use them to explicitly opt-in) and completely removed in 1.15. The old node types
  can be replaced with the `Newland.Toubiz.Poi.Neos:FilteredTeaserList` node type.
    - `Newland.Toubiz.Poi.Neos:FilteredLists`: The overview page for articles.
    - `Newland.Toubiz.Poi.Neos:TeaserList`: The regular teaser list.
  
### Action required
- You will need to execute the node migration `20190726170700` in order to migrate the previous
  preselected categories and attributes to the new ones.
  
```bash
$ php flow node:migrate --version 20190726170700
```

## [1.12.3] - 2019-07-22
### Added
- The Webcam image from `cityData` is now viewed in a `lightbox` when clicked.

## [1.12.2] - 2019-07-15
### Fixed
- Searching for article link targets is now guaranteed to include at least one result per article
  main type if available. This prevents cities from not showing up because every POI inside of them
  has the city name in it's name.
- Fixed cross package translations.

## [1.12.0] - 2019-07-12
### Added
- Multisite websites can now specify one google maps API key to use in article detail pages
  per site.
- Resort attributes are now displayed on article detail pages.
- It is now possible to create a shortcut node pointing to an article detail page.
- Cities (Orts-POI) are now imported from Toubiz and have their own set of list and detail
 pages.
- Translations for City pages in French, Spanish, Italian and Dutch.
- SEO information for City elements.
- Widgets that build the City Page Details. The configuration can is the under:
```yaml
        cityDetails:
          defaultTranslation:
            package: Newland.Toubiz.Poi.Neos
            source: Views/Cities
          links:
            data:
              restaurants:
                target: 'node://4d8c8785-eae1-474a-9ecb-1775360246ab'
              tours:
                target: 'node://6889fd78-f19c-4136-82a8-e62b94ee28fa'
              events:
                target: 'node://b5ed49ea-685d-4563-8d05-4d134e27bfd3'
              lodgings:
                target: 'node://a2c4f0c5-003b-403d-9b6b-9c4b771e6c7b'
              attractions:
                target: 'node://a0829ac0-5a9a-4ad1-b7c5-fbb03a482ea6'
```

### Fixed
- Fixed preselected properties in POI lists not being applied.
- Fixed some attributes on detail pages being HTML encoded causing HTML-tags in the content
  to be printed to the user.
- All Gallery items will now display titel and copyright when shown in the lightbox.
- Single POI Teasers now correctly display the opening times
- All Gallery items will now display titel and copyright when shown in the lightbox.

### Changed
- Gastronomy records are now displayed with all of their categories on the detail page.
- SocialUrls now go through a more strict check when they are imported.

### Action Required
- Static map API Keys must now be organized by the node-name of the website they apply for.
  The key `default` will apply as a fallback.

```yaml
# Before
Newland:
  Toubiz:
    Poi:
      Neos:
        staticMap:
          apiKey: 'abcdef'

# After
Newland:
  Toubiz:
    Poi:
      Neos:
        staticMap:
          apiKey:
            default: 'abcdef'
            'newland-tuntheme': 'abcdef'
            radolfzell: 'abcdef'
```

## [1.10.2] - 2019-06-19
### Added
- Breadcrumb configuration can now be defined on a per-site basis using the
  articles node name as a key. For more information please refer to `README.md`.
  Existing configuration will continue working for now but support for it will be
  removed with the next release. Please update your breadcrumb configuration to use
  keys under `breadcrumb` (at least use `_fallback` if you don't differentiate between)
  sites.

```yaml
# Before:
Newland:
  Toubiz:
    Poi:
      Neos:
        detailPage:
          2:
            breadcrumb:
              - '/sites/foobar-theme/node-abc123def'
              - '/sites/foobar-theme/node-abc123def/node-49494949'

# After
Newland:
  Toubiz:
    Poi:
      Neos:
        detailPage:
          2:
            breadcrumb:
              _fallback:
                - '/sites/foobar-theme/node-abc123def'
                - '/sites/foobar-theme/node-abc123def/node-49494949'
              # Site specific breadcrumbs can be added here.
```

- POI detail pages can now use a domain-specific map api key.
  Check the README.md for a configuration example.

## [1.10.1] - 2019-06-07
### Fixed
- Fixed incorrect output of gastronomyStyle attribute

## [1.10.0] - 2019-06-07
### Added
- New backend module for article statistics (popular tags for POI)
- Congress location teaser added.
- Two new node migrations for the preselection filters. They are `Version20190521113800` and `Version20190521161500`
  Check the readme for how to run them.
- New ability to preselect tags for lists. This allows restricting a list by the tag attribute in the backend.
- Thermal & Accessibility attributes are now being imported

### Changed
- TPortal detail URLs are now being handled at import time and are now part of the `Newland.Toubiz.Sync.Neos` configuration.
- Preselection filters are now split in to Categories, Properties and Tags.
- Data sources for articles can no be limited to main type.
- Gastronomy articles now display the description in detail view.
- Opening times are now being displayed as human readable text (e.g. "Closes soon, reopens 14:00")

### Fixed
- Category filter options are now language aware.
- Data sources for articles and categories are now language aware.
- Detail URLs now contain a unique identifier. This prevents multiple records with the same title from
  having `-1` appended to them. Request to the old detail URLs will be redirected accordingly.
- Gastronomy articles now always display the description in detail view.
- Similar articles are now displayed for tours only instead of for all articles _but_ tours.

### Removed
- OnSite / nearby articles are not displayed anymore for non-tours.

### Potentially breaking / Action required
- Two new node migrations for the preselection filters. They are `Version20190521113800` and `Version20190521161500`
  These migrations split the preselected topics filter in the backend in to 3 different ones - Tags, Categories and properties.
  You can run them by executing the following command:
  - `php flow node:migrate 20190521161500`
  - `php flow node:migrate 20190521113800`
- The `poi:context.tportalBaseUri` viewhelper has been removed due to substantial changes in how tportal uris are handled.
  Your sites quickfinder may be using this viewhelper in order to generate a form uri. In that case calls can be replaced
  in the following way:
  ```html
    <!-- before -->
    <form action="{poi:context.tportalBaseUri(targetBaseUri: tportal.targetBaseUri, targetUriSegment: tportal.targetUriSegment)}"></form>

      <!-- after -->
      <form action="{tportal.targetBaseUri}/{tportal.targetUriSegment}/ukv"></form>
  ```
  In case you are using the viewhelper without arguments (or in case of the arguments being `null`) please note the deprecation
  of the `Newland.Toubiz.Poi.lodging` configuration which was used in that case. Please move the configuration into the format
  mentioned in the example.
- TPortal detail URLs can now be configured in the `Newland.Toubiz.Sync.Neos` configuration.
  The `Newland.Toubiz.Poi.lodging` configuration is now deprecated and will be removed in the next version.
  Please adjust your configuration and re-sync in order to prevent undefined behaviour.
  ```yaml
  # Before
  Newland:
    Toubiz:
      Poi:
        Neos:
          lodging:
            targetBaseUri: 'https://www.bodenseewest.eu'
  
  # After
  Newland:
    Toubiz:
      Sync:
        Neos:
          services:
            'Tportal/Api':
              westlicherbodensee:
                client: westlicherbodensee
                detailUri: 'https://www.bodenseewest.eu/{tportalUriSegment}'
  ```

## [1.8.2] - 2019-05-17
### Changed
- ArticleIndexer is now compatible with Search 1.1.0
- Scope name of article indexer has changed to `toubiz_articles`

### Potentially breaking
- This package now requires Search 1.1.0 or later

## [1.8.1] - 2019-05-09
### Added
- Hook to build article URLs on sync

### Fixed
- Previously selected non-existent topics are now displayed in backend to allow removing them

## [1.8.0] - 2019-05-08
### Added
- POIs are now language aware

### Changed
- Gallery images are now displayed in the order as defined during import 
- Article attributes are not checked for existence when populating the pre-filter field in the backend

## [1.7.1] - 2019-04-18
### Fixed
- Fixed days in opening times being offset by 1
- Opening times table now takes non-regular opening times into account
- Opening times are no longer displayed if none exist

### Changed
- Opening Times Table now starts at the current day

## [1.7.0] - 2019-04-17
### Added
- Opening times to article detail view 
- Attributes for Direct Marketers are now synched and displayed 
- New social media information is now fetched 
- Templates for direct marketers

### Changed
- tportalViewHelper adapted to allow fixed properties 
- Prefiltered regions are applied on more than just one filtered list.
- Dependency to toubiz-search-neos is now versions instead of a specific feature branch.

### Fixed
- Galery duplicates

## [1.6.0] - 2019-04-04
### Added
- Support for custom breadcrumbs for detail pages.
- Support for multilingual detail pages
- LinkHandler support is now bundled by default.

### Changed
- `Newland.Toubiz.Poi.Neos:List` is now `Newland.Toubiz.Poi.Neos:List*` for each article type
- `Newland.Toubiz.Poi.Neos:TeaserList` is now `Newland.Toubiz.Poi.Neos:TeaserList*` for each article type

### Fixed
- Ajax results now generate correct frontend links

### Migration Notes
- Use `$ php flow node:migrate --version 20190314223200` to automatically migrate all lists
- Use `$ php flow node:migrate --version 20190314223900` to automatically migrate all teaser lists
- If you project has Linkhandler configuration (In `Newland.NeosCommon.linkhandler`)
  for Articles under the name `poi` then that configuration can be safely removed.

## [1.5.1] - 2019-03-08
- No functional changes

## [1.5.0] - 2019-03-08
### Added
- FilteredLists and TeaserLists can now be pre-filtered by regions. Regions can
be anything from a group of zip codes to a group of other regions.
- FilteredLists Plugin with a landing page displaying swipers and a grid view with many, many configurable filter options
- Article Detail views are now located on static routes that can be configured
on a per-type basis in `Newland.Toubiz.Poi.Neos.detailPage`. Previous detail URLs
are automatically redirected to the new ones.
- A new `Newland.Article.findByIdentifier` fusion helper has been added.
- Attribute cache can now be rebuilt manually via command `attribute:buildcache`.
- Added a Node Migration to change a legacy property on Teaser Lists

### Changed
- The `List` plugin now has filters associated with it.

### Migration Notices
- Be sure to include the `newland/page-frame-provider` repository in your projects `composer.json`
- Be sure to run `php flow node:migrate` on deployment to correctly adapt existing teaser lists
to the current property, if you want to check the status run `php flow node:migrationstatus`.
