silverstripe / silverstripe-staticpublishqueue

This module allows you to build static HTML caches of every page (for increased security and performance)
BSD 3-Clause "New" or "Revised" License
46 stars 57 forks source link

URL's get stage appended in fullbuildtask if they are included in urlsToCache() method #159

Closed lars-lemon8 closed 1 year ago

lars-lemon8 commented 1 year ago

Been digging around a bit, and I have isolated the problem below:

When running the static cache full build task (through the cli), any URLs that are included in urlsToCache() methods in a page class get ?stage=Stage added to the URL. These cannot be processed by the task and will result in the Static Cache Full Build task to end up paused.

So for example, the URL below will end up in the list of URL's to be processed as '/?stage=Stage'

  public function urlsToCache()
    {
        return [HomePage::get()->first()->Link()=>1];
    }

Related issue:

150

GuySartorelli commented 1 year ago

Is this actually different to #150? Or are they both symptoms of the same underlying issue?

lars-lemon8 commented 1 year ago

@GuySartorelli , they certainly are related. I'm not sure they are the same though.

GuySartorelli commented 1 year ago

@lars-lemon8 If you can't point out how they're different, I think it's easiest to just treat them as the same issue.

GuySartorelli commented 1 year ago

Closing with the assumption they're effectively the same issue. If you can indicate how they're different I'll reopen.