Commit graph

50 commits

Author SHA1 Message Date
00946af6ad
Properly handle latitude and longitude during Destination One import (#32)
They sometimes use a different separator.
The code is adjusted to always use same separator and precision.

That will prevent the same location from showing up multiple times due
to different latitude and longitude values.
2023-07-06 12:39:47 +02:00
9f0eaac154
Improve CGL 2023-07-04 10:21:49 +02:00
0ca95bc410
De-duplicate code within functional tests (#28) 2023-07-04 10:11:26 +02:00
0f7323eac3
Fix removal of still used files (#27)
Simplify SQL queries and move logic to PHP.
2023-06-20 11:56:59 +02:00
c56a10b748
Improve meta data of imported files (#24)
* Set ``alternative`` to the ``description`` if available.

* Set ``creator_tool`` to the "destination.one".

* Set ``source`` to the URL of the fetched image.
2023-06-19 10:22:54 +02:00
bae680025e
Flush corresponding page caches on import (#25)
The pages now receive proper cache tags.
The import now properly clears those cache tags.
That way all corresponding pages will show updated content after import
finished.

We need one test that executes frontend requests and import command.
The separation is therefore removed and tests are streamlined to have a
single parent providing all necessary information and setup.
2023-06-19 10:13:26 +02:00
a756998f1f
Add proper image handling during import (#22)
Import now properly handles images.
It only added missing images beforehand but now will properly:
- Remove
- Resort
- Add
- Update

Relates: #10521
2023-06-12 11:07:52 +02:00
d4a11436c6
Streamline CGL (#21)
Use php-cs-fixer as within other extensions.
Use same configuration.
Apply configuration
2023-06-07 08:56:42 +02:00
d6d3330bd3
Fix wrong detection of Page Cache timeout (TTL) (#20)
Use the earliest instead of latest timeout.
Extend tests to cover the bug.

Relates: #10506
2023-05-24 09:45:15 +02:00
76c1e79ea3
Respect new upcoming feature when calculating TTL of page cache (#17)
Relates: #10506
2023-05-23 11:46:18 +02:00
99ef32a37b
Allow to show only upcoming events (#16)
A new TypoScript option upcoming is added.
The option can be set to 0 (default) or 1.
0 behaves the same way as in the past.
1 turns off the option useMidnight, start and end.
Only dates with a start date in the future will be shown.

Relates: #10507
2023-05-22 09:59:45 +02:00
0fc2668d17
Improve TYPO3 cache handling (#14)
There might be access to TSFE get_cache_timeout() prior rendering
events.
TYPO3 has a cache for timeout and won't re calculate again.
We therefore need to clear the cache if timeout would change.

That will lead to inconsistent cache information throughout a single
request. But the final cache timeout of the page will be correct. Other
parts might be longer, which probably is fine until they relate to the
events.

Relates: #10500
2023-05-16 10:15:05 +02:00
9bc0466e5d
Improve automated testing (#15)
Use abstract classes to include necessary steps and keep actual test
cases small.
Ensure tests in CI run faster but not installing unnecessary
dependencies. But use pre installed ImageMagick.
2023-05-16 09:46:53 +02:00
9c8e1aa982
Do not delete files if they are still in use (#12)
The clean up task had an issue to clean up to many files.
It didn't check if a file that could be deleted
because one event got deleted, was still in use by another event.

Relates: #10499
2023-05-15 15:35:48 +02:00
53ee309768
Migrate all database fixtures (#10)
We switched to PHPDataSets already but didn't migrate all usages.
This commit now migrates all usages left behind.
2023-05-15 11:58:19 +02:00
adc8b30e6d
Extend TYPO3 page cache timout calculation based on rendered dates (#9)
Relates: #10349
2023-05-04 15:23:23 +02:00
a49ba7c4d2
Fix 404 for dates after re import (#7) 2023-04-03 11:34:56 +02:00
Dirk Koritnik
f3b3a70948
Remove rte config fram tca, fix text cleanup from linebreaks (#3) 2023-03-17 12:58:06 +01:00
c771924b8e
Properly handle time searches 2023-02-21 14:06:59 +01:00
f68da60842 Provide configurable repeatUntil fallback 2023-01-05 09:01:13 +00:00
fcbda4c093 Add default routing 2022-11-23 09:59:55 +00:00
6412c31be5 Do not delete files unrelated to events 2022-11-22 14:59:06 +00:00
2d2b9ac993 Remove old code base 2022-11-22 12:49:57 +00:00
96a650c5aa Do not fetch dates without available event 2022-09-09 08:50:24 +00:00
e1674b1472 Fix broken timezone during import 2022-08-29 12:44:36 +00:00
5cfbe11167 Add first functional tests covering location filter 2022-08-09 09:56:18 +02:00
239bfe51fc Remove slugs from locations 2022-08-03 09:24:01 +00:00
5652ea6442 Fix broken import without features 2022-08-03 08:57:52 +02:00
65e653f6ec Add location as separate record 2022-08-02 13:56:18 +00:00
0a56a5d482 Integrate destination data features
Import alongside of categories.
Use TYPO3 sys_category again.
2022-07-13 15:59:42 +02:00
6e6e914e36 Ensure first date of recurring daily event is created 2022-07-13 13:58:05 +00:00
b0dae68550 Fix broken timezone and end time after import of recurring events 2022-07-07 12:10:49 +00:00
6b6ae5b20c Do not break tests once a certain date is passed
The code used native date functions, this made tests not robust.
We switch to TYPO3 API to fetch the current date and time.
Test is adjusted to define the date and time to verify code works as
expected.
2022-07-07 09:10:14 +02:00
3d98475a6c Fix none working import of ticket links from destination data
The existing code didn't work with the provided data.
We added a new test case to cover the situation.
We adjusted the existing code to check on the actual rel value instead
of the keys.
2022-07-07 09:03:29 +02:00
96f07fd501 Ensure title of sys_file_metadata is not exceeded
The columns is limited by length.
We ensure we do crop incoming file names before adding them to the
database.
We would run into exception otherwise.
2022-06-28 11:39:12 +02:00
fc8c2b3046 Do not enter endless loop while date creation
Entering the continue part would end in an endless loop.
We never add anything to $i and therefore would end up here.

Existing tests ensure we don't break something.
The new test ensures we do not hit endless loop anymore.
2022-06-27 16:07:36 +02:00
c506720689 Respect that interval is now always set within timeIntervals
The property will always be set in the future.
We no longer can use it as an indicator.

We switch to freq as new indicator.
We also ensure that start has to be given for a single date.

Relates: #9892
2022-04-25 07:47:47 +02:00
948f571f9d Extend functional test with daily and weekly frequency
Both are supported during import from destination data.
But both were not part of functional tests yet.
They are added in order to ensure that future changes wont break import
of that data
2022-04-21 08:29:45 +02:00
3d6bf0ac8a Add import configuration record
It is now possible to create "Import" records in TYPO3 system.
Those records can then be imported via two new commands.
There is no need to configure everything within the command itself.

That allows:
    * To allow editors to maintain import configuration.
    * Have proper labels, description, csh and UI to create import.
      It no longer is necessary to copy UIDs,
      instead proper wizards from TCA are available to select pages.

Relates: #9649
2022-01-27 15:50:36 +01:00
b5d095659a Use new import class and move url building and fetching 2022-01-26 15:15:15 +01:00
c3333f0147 Fix example data to work for some years
There was still one entry which reached end of life and was increased.
2022-01-26 15:02:21 +01:00
06d111e132 Do not trigger warning if no category was configured
The import already worked without category, but triggered a warning.
Tests were extended to always work with category, except in new test
case.
All tests were extended to check for empty logs in the end.

The import now checks whether category should be imported and ignores
further processing if not configured.

Relates: #9542
2021-12-20 10:15:26 +01:00
ab9c3e0c4e Fix broken remove past data
Past data is now removed again.
A test ensures the functionality.
Data is no longer marked as deleted but is actually deleted.

Relates: #9543
2021-12-20 09:45:25 +01:00
a8c475fbd7 Reflect TYPO3 behaviour in tests
TYPO3 scheduler tasks always have a value for console commands.
Region uid will be an empty string if omitted within scheduler task.
We reflect that in our tests and adapt code to not break.
Furthermore tests call only with strings, as that's what TYPO3 does.
2021-12-16 14:34:17 +01:00
6aa4681cb9 Delete files which were referenced by events objects
Adjust existing code base to not use hardcoded file path.
Instead use info from database and check all files which have references
to event objects.

Also add test to cover feature.
2021-12-16 14:07:32 +01:00
f06f9c3303 Use empty image for tests
We do not need content, so no need for an actual image which uses space
and might have some license.
2021-12-16 13:20:43 +01:00
410f5ab534 Fix naming of test 2021-12-16 13:20:16 +01:00
fb2eceb5e6 Refactor tests to move common code into parent class
This keeps tests smaller and everyone can see the setup of the test and
assertions, without boilerplate code in between.
2021-12-16 10:12:26 +01:00
15dec49445 Remove usage of uploads folder, use transient API instead
Relates: #9533
2021-12-16 10:00:51 +01:00
0e5cd38176 Add first basic functional test for import
The test ensures import runs with a small example set of events.

We needed to alter fetching of images, in order to properly mock
responses.
2021-12-16 09:08:16 +01:00