Next import showing when import period set to "off"

Created on 7 May 2025, 3 months ago

Problem/Motivation

When import period is set to off and you view the import it shows as

Next import: Wed, 12/31/1969 - 16:59

Steps to reproduce

1. In import type, set import period to "off"

2. View your import (you likely will need to run it, so it updates)

Proposed resolution

Add a conditional in the feeds_feeds.html.twig file so it checks.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇨🇦Canada No Sssweat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @No Sssweat
  • 🇨🇦Canada No Sssweat

    Here is a patch, I tested it so it would still work even if someone changes the Next import date format in Manage Display.

  • 🇨🇦Canada No Sssweat

    Re-rolled the patch, my IDE accidentally modified some of the spacing up top.

  • 🇨🇦Canada No Sssweat

    Updated conditional so it's compatible with any timezone.

  • Status changed to Needs review 14 days ago
  • First commit to issue fork.
  • 🇳🇱Netherlands megachriz

    It depends on the current user time zone for how the date is displayed. For example, I have for one feed displaying the following:

    do, 01/01/1970 - 00:59

    I think it is better to fix this in FeedViewBuilder and replace the date with the text 'Not scheduled'. This is also consistent with how a similar issue was fixed in the D7 version of Feeds.

    It will then look like this:

  • @megachriz opened merge request.
  • 🇳🇱Netherlands megachriz

    I think it would be good to add tests for this. The tests should cover the following:

    • When periodic import is configured for a feed type, the date for the next import should be displayed.
    • When periodic import is NOT configured for a feed type, it should say "Not scheduled".
    • When periodic import is NOT configured for a feed type, but an import in background is started, it should say "On next cron run" (or something similar, refer to the D7 version of Feeds for that).

    Since I think that case 3 is currently not working, setting this issue to "Needs work".

Production build 0.71.5 2024