Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artisan command in Listener returns error. #10981

Open
geertjanknapen1 opened this issue Oct 21, 2024 · 9 comments
Open

Artisan command in Listener returns error. #10981

geertjanknapen1 opened this issue Oct 21, 2024 · 9 comments
Labels

Comments

@geertjanknapen1
Copy link

Bug description

I'm running into a problem regarding caching routes using Artisan::call upon saving of an Entry in a specific collection.

We have a collection named dynamic_pages, this allows our content-managers to create pages with dynamic URLs (i.e there are no route definitions in web.php for this).

Due to the routes being dynamic, I would like to clear and then cache the routes upon saving of an Entry in this collection.

I've created created a listener that listens to the EntrySaved event, upon save, I check if the Entry being saved is part of the dynamic_pages collection, if that's the case I want to clear and cache the routes again.

Clearing the cache works fine, the issue arises when I try to cache the routes again. This throws a Call to member function can() on null which happens in the Entries.php fieldtype because $user is null. However, I'm calling the command from my code, so why is Statamic expecting a user?

The listener:

public function handle (EntrySaved $event)
{
    Artisan::call('route:clear'); // Works great
    Artisan::call('route:cache'); // Causes the error described above.
}

How to reproduce

Haven't tried this on a fresh site, but seems to me it should work;

  • Create two new collections.
  • Make sure there is an Entries field in the blueprint of one of them, linking to the other.
  • Add an entry into the collection.
  • Set up a listener that listens to EntrySaved events.
  • Use Artisan::call('route:cache') from the listener
  • Observe the error.

Blueprint:

title: 'Dynamic Page'
tabs:
  content:
    display: Content
    sections:
      -
        fields:
          -
            handle: title
            field:
              type: text
              required: true
              localizable: true
              validate:
                - required
              display: Title
              instructions_position: below
              listable: hidden
              visibility: visible
              always_save: false
              placeholder: 'My page title'
              input_type: text
              antlers: false
          -
            handle: excerpt
            field:
              collapse: false
              always_show_set_button: false
              previews: false
              buttons:
                - h1
                - h2
                - h3
                - h4
                - h5
                - h6
                - bold
                - italic
                - unorderedlist
                - orderedlist
                - removeformat
                - quote
                - anchor
                - image
                - table
                - underline
                - strikethrough
                - small
              container: images
              save_html: false
              toolbar_mode: fixed
              link_noopener: false
              link_noreferrer: false
              target_blank: false
              link_collections:
                - pages
              reading_time: true
              fullscreen: true
              allow_source: true
              enable_input_rules: true
              enable_paste_rules: true
              antlers: false
              remove_empty_nodes: false
              display: Excerpt
              type: bard
              icon: bard
              localizable: true
              listable: hidden
              instructions_position: above
              visibility: visible
              always_save: false
              validate:
                - required
          -
            import: general_content_field
  sidebar:
    display: Sidebar
    sections:
      -
        fields:
          -
            handle: slug
            field:
              type: slug
              localizable: false
              display: Slug
              instructions_position: above
              listable: hidden
              visibility: visible
              always_save: false
              from: title
              generate: false
              validate:
                - required
                - 'unique_entry_value:{collection},{id},{site}'
              instructions: 'Page Identifier'
              show_regenerate: false
              hide_display: false
          -
            handle: url
            field:
              input_type: text
              antlers: false
              display: URL
              type: text
              icon: text
              instructions: 'Page URL'
              localizable: true
              listable: hidden
              instructions_position: above
              visibility: visible
              validate:
                - required
          -
            handle: template
            field:
              hide_partials: true
              blueprint: false
              folder: templates
              display: Template
              type: template
              icon: template
              instructions: 'Choose a template for this page'
              localizable: false
              listable: hidden
              instructions_position: above
              visibility: visible
              always_save: false
              validate:
                - required
          -
            handle: hide_newsletter_footer
            field:
              default: false
              type: toggle
              display: 'Hide newsletter footer'
              icon: toggle
              localizable: false
              listable: hidden
              instructions_position: above
              visibility: visible
              hide_display: false
          -
            handle: tags
            field:
              type: terms
              taxonomies:
                - tags
                - grow-styles
              display: Tags
              mode: default
              localizable: false
              instructions_position: above
              listable: hidden
              visibility: visible
              always_save: false
              create: true
          -
            import: general_access_list_field
  media:
    display: Media
    sections:
      -
        fields:
          -
            handle: header_video
            field:
              max_items: 1
              mode: select
              create: true
              collections:
                - videos
              type: entries
              display: 'Header video'
              icon: entries
              instructions: 'Choose the header video for this page (if applicable for the chosen template)'
              localizable: true
              listable: hidden
              instructions_position: above
              visibility: visible
              hide_display: false
              if:
                slug: 'contains_any hobby,commercial,our-universe'
          -
            handle: header_images
            field:
              use_breakpoints: true
              allow_ratio: true
              allow_fit: true
              breakpoints:
                - xs
                - md
                - xl
              container: images
              restrict: false
              allow_uploads: true
              display: 'Header Images'
              type: responsive
              icon: assets
              localizable: false
              listable: hidden
              instructions_position: above
              visibility: visible
              always_save: false
              hide_display: false
              folder: pages
          -
            import: alt_tags_fieldset
            prefix: header_image_
  translations:
    display: Translations
    sections:
      -
        fields:
          -
            import: translations_fieldset
  relations:
    display: Relations
    sections:
      -
        display: Relations
        fields:
          -
            import: related_fieldset

General content fieldset

title: 'General content field'
fields:
  -
    handle: content
    field:
      collapse: false
      always_show_set_button: false
      previews: false
      buttons:
        - h1
        - h2
        - h3
        - h4
        - h5
        - h6
        - horizontalrule
        - bold
        - italic
        - unorderedlist
        - orderedlist
        - removeformat
        - quote
        - anchor
        - image
        - table
        - underline
        - strikethrough
        - small
        - superscript
        - subscript
        - alignleft
        - aligncenter
        - alignright
        - alignjustify
      container: images
      save_html: false
      toolbar_mode: fixed
      link_noopener: false
      link_noreferrer: false
      target_blank: false
      reading_time: true
      fullscreen: true
      allow_source: true
      enable_input_rules: true
      enable_paste_rules: true
      antlers: false
      remove_empty_nodes: false
      display: Content
      type: bard
      localizable: true
      listable: hidden
      instructions_position: above
      visibility: visible
      always_save: false
      validate:
        - required
      sets:
        main:
          display: Main
          instructions: null
          icon: null
          sets:
            slider_set:
              display: 'Slider Set'
              instructions: null
              icon: layout-carousel-horizontal
              fields:
                -
                  handle: slider
                  field:
                    max_items: 1
                    mode: select
                    create: true
                    collections:
                      - sliders
                    display: Slider
                    type: entries
                    instructions: 'Select the slider you want to display'
                    localizable: false
                    listable: hidden
                    instructions_position: above
                    visibility: visible
                    always_save: false
            horizontal_block:
              display: 'Horizontal Block'
              instructions: null
              icon: layout-split-horizontal
              fields:
                -
                  handle: title
                  field:
                    input_type: text
                    antlers: false
                    display: Title
                    type: text
                    localizable: false
                    listable: hidden
                    instructions_position: above
                    visibility: visible
                -
                  handle: text_field
                  field:
                    input_type: text
                    antlers: false
                    display: 'Text Field'
                    type: text
                    localizable: false
                    listable: hidden
                    instructions_position: above
                    visibility: visible
                -
                  handle: partners
                  field:
                    default: false
                    display: Partners
                    type: toggle
                    localizable: false
                    listable: hidden
                    instructions_position: above
                    visibility: visible
                -
                  handle: block
                  field:
                    collapse: false
                    previews: true
                    sets:
                      general:
                        display: General
                        fields:
                          -
                            handle: text
                            field:
                              input_type: text
                              antlers: false
                              display: Text
                              type: text
                              icon: text
                              localizable: false
                              listable: hidden
                              instructions_position: above
                              visibility: visible
                              validate:
                                - required
                          -
                            handle: link
                            field:
                              display: Link
                              type: link
                              icon: link
                              localizable: false
                              listable: hidden
                              instructions_position: above
                              visibility: visible
                          -
                            handle: open_in_new_window
                            field:
                              default: false
                              display: 'Open in new window'
                              type: toggle
                              icon: toggle
                              localizable: false
                              listable: hidden
                              instructions_position: above
                              visibility: visible
                          -
                            handle: images
                            field:
                              use_breakpoints: true
                              allow_ratio: true
                              allow_fit: true
                              breakpoints:
                                - sm
                                - lg
                              restrict: false
                              allow_uploads: true
                              display: Images
                              type: responsive
                              icon: assets
                              localizable: false
                              listable: hidden
                              instructions_position: above
                              visibility: visible
                              container: images
                    display: Block
                    type: replicator
                    localizable: false
                    listable: hidden
                    instructions_position: above
                    visibility: visible
            image_content_block:
              display: 'Image Content Block'
              instructions: null
              icon: media-image-picture-orientation
              fields:
                -
                  handle: image_content_block_title
                  field:
                    input_type: text
                    antlers: false
                    display: 'Image Content Block Title'
                    type: text
                    localizable: false
                    listable: hidden
                    instructions_position: above
                    visibility: visible
                -
                  handle: image_content_block_text
                  field:
                    restrict: false
                    automatic_line_breaks: true
                    automatic_links: false
                    escape_markup: false
                    smartypants: false
                    antlers: false
                    display: 'Image Content Block Text'
                    type: markdown
                    localizable: false
                    listable: hidden
                    instructions_position: above
                    visibility: visible
                -
                  handle: image_content_block_item
                  field:
                    collapse: false
                    previews: true
                    sets:
                      general:
                        display: General
                        fields:
                          -
                            handle: title
                            field:
                              input_type: text
                              antlers: false
                              display: Title
                              type: text
                              icon: text
                              localizable: false
                              listable: hidden
                              instructions_position: above
                              visibility: visible
                          -
                            handle: text
                            field:
                              restrict: false
                              automatic_line_breaks: true
                              automatic_links: false
                              escape_markup: false
                              smartypants: false
                              antlers: false
                              display: Text
                              type: markdown
                              icon: markdown
                              localizable: false
                              listable: hidden
                              instructions_position: above
                              visibility: visible
                          -
                            handle: image
                            field:
                              use_breakpoints: true
                              allow_ratio: true
                              allow_fit: true
                              breakpoints:
                                - lg
                              restrict: false
                              allow_uploads: true
                              display: Image
                              type: responsive
                              icon: assets
                              localizable: false
                              listable: hidden
                              instructions_position: above
                              visibility: visible
                              container: images
                          -
                            handle: cta_text
                            field:
                              input_type: text
                              antlers: false
                              display: 'CTA text'
                              type: text
                              icon: text
                              localizable: false
                              listable: hidden
                              instructions_position: above
                              visibility: visible
                          -
                            handle: cta_link
                            field:
                              display: 'CTA link'
                              type: link
                              icon: link
                              localizable: false
                              listable: hidden
                              instructions_position: above
                              visibility: visible
                          -
                            handle: open_in_new_window
                            field:
                              default: false
                              display: 'Open in new window'
                              type: toggle
                              icon: toggle
                              localizable: false
                              listable: hidden
                              instructions_position: above
                              visibility: visible
                    display: 'Image Content Block Item'
                    type: replicator
                    localizable: false
                    listable: hidden
                    instructions_position: above
                    visibility: visible
            accordion_horizontal:
              display: 'Accordion Horizontal'
              instructions: null
              icon: layout-split-verical
              fields:
                -
                  handle: accordion_item
                  field:
                    collapse: false
                    previews: true
                    sets:
                      general:
                        display: General
                        fields:
                          -
                            handle: images
                            field:
                              mode: list
                              restrict: false
                              allow_uploads: true
                              show_filename: true
                              display: Images
                              type: assets
                              icon: assets
                              localizable: false
                              listable: hidden
                              instructions_position: above
                              visibility: visible
                              container: images
                              max_files: 1
                          -
                            handle: title
                            field:
                              input_type: text
                              antlers: false
                              display: Title
                              type: text
                              icon: text
                              localizable: false
                              listable: hidden
                              instructions_position: above
                              visibility: visible
                          -
                            handle: text
                            field:
                              restrict: false
                              automatic_line_breaks: true
                              automatic_links: false
                              escape_markup: false
                              smartypants: false
                              antlers: false
                              display: Text
                              type: markdown
                              icon: markdown
                              localizable: false
                              listable: hidden
                              instructions_position: above
                              visibility: visible
                    display: 'Accordion item'
                    type: replicator
                    localizable: false
                    listable: hidden
                    instructions_position: above
                    visibility: visible
            form:
              display: Form
              instructions: null
              icon: mail-inbox-content
              fields:
                -
                  handle: content_form
                  field:
                    max_items: 1
                    display: 'Content form'
                    type: form
                    localizable: false
                    listable: hidden
                    instructions_position: above
                    visibility: visible
                    validate:
                      - sometimes
            list_block:
              display: 'List block'
              instructions: null
              icon: file-content-list
              fields:
                -
                  handle: list_content
                  field:
                    buttons:
                      - unorderedlist
                      - orderedlist
                    smart_typography: false
                    save_html: false
                    inline: false
                    toolbar_mode: fixed
                    reading_time: false
                    fullscreen: true
                    allow_source: true
                    enable_input_rules: true
                    enable_paste_rules: true
                    remove_empty_nodes: false
                    antlers: false
                    link_noopener: false
                    link_noreferrer: false
                    target_blank: false
                    always_show_set_button: false
                    collapse: false
                    previews: true
                    type: bard
                    display: 'List content'
                    localizable: true
                    listable: hidden
                    instructions_position: above
                    visibility: visible
                    hide_display: false
            read_more:
              display: 'Read more'
              instructions: null
              icon: layout-flip-down
              fields:
                -
                  handle: read_more_id
                  field:
                    input_type: text
                    antlers: false
                    type: text
                    display: 'Read more id'
                    localizable: false
                    listable: hidden
                    instructions_position: above
                    visibility: visible
                    hide_display: false
                    validate:
                      - required
                    placeholder: readMoreOne
                -
                  handle: read_more_link
                  field:
                    input_type: text
                    antlers: false
                    type: text
                    display: 'Read more link'
                    localizable: false
                    listable: hidden
                    instructions_position: above
                    visibility: visible
                    hide_display: false
                -
                  handle: content_text
                  field:
                    automatic_line_breaks: true
                    automatic_links: false
                    escape_markup: false
                    smartypants: false
                    container: images
                    folder: /
                    restrict: false
                    antlers: false
                    type: markdown
                    display: 'Content text'
                    localizable: true
                    listable: hidden
                    instructions_position: above
                    visibility: visible
                    hide_display: false
      smart_typography: false
      inline: false
      placeholder: 'Image Content Block Bard Text'
      hide_display: false
      replicator_preview: true
      word_count: false

Logs

[2024-10-21 08:55:58] dev.ERROR: Call to a member function can() on null {"exception":"[object] (Error(code: 0): Call to a member function can() on null at /usr/share/nginx/html/vendor/statamic/cms/src/Fieldtypes/Entries.php:278)
[stacktrace]
#0 [internal function]: Statamic\\Fieldtypes\\Entries->Statamic\\Fieldtypes\\{closure}()
#1 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(600): array_map()
#2 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(778): Illuminate\\Support\\Arr::map()
#3 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(404): Illuminate\\Support\\Collection->map()
#4 /usr/share/nginx/html/vendor/statamic/cms/src/Fieldtypes/Entries.php(273): Illuminate\\Support\\Collection->flatMap()
#5 /usr/share/nginx/html/vendor/statamic/cms/src/Fieldtypes/Relationship.php(134): Statamic\\Fieldtypes\\Entries->getCreatables()
#6 /usr/share/nginx/html/vendor/statamic/cms/src/Fieldtypes/Entries.php(432): Statamic\\Fieldtypes\\Relationship->preload()
#7 /usr/share/nginx/html/vendor/statamic/cms/src/Fieldtypes/Link.php(79): Statamic\\Fieldtypes\\Entries->preload()
#8 /usr/share/nginx/html/vendor/statamic/cms/src/Fields/Field.php(417): Statamic\\Fieldtypes\\Link->preload()
#9 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php(60): Statamic\\Fields\\Field->meta()
#10 [internal function]: Illuminate\\Support\\HigherOrderCollectionProxy->Illuminate\\Support\\{closure}()
#11 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(600): array_map()
#12 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(778): Illuminate\\Support\\Arr::map()
#13 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php(59): Illuminate\\Support\\Collection->map()
#14 /usr/share/nginx/html/vendor/statamic/cms/src/Fields/Fields.php(306): Illuminate\\Support\\HigherOrderCollectionProxy->__call()
#15 /usr/share/nginx/html/vendor/statamic/cms/src/Fieldtypes/Replicator.php(202): Statamic\\Fields\\Fields->meta()
#16 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(627): Statamic\\Fieldtypes\\Replicator->Statamic\\Fieldtypes\\{closure}()
#17 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(826): Illuminate\\Support\\Arr::mapWithKeys()
#18 /usr/share/nginx/html/vendor/statamic/cms/src/Fieldtypes/Replicator.php(201): Illuminate\\Support\\Collection->mapWithKeys()
#19 /usr/share/nginx/html/vendor/statamic/cms/src/Fields/Field.php(417): Statamic\\Fieldtypes\\Replicator->preload()
#20 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php(60): Statamic\\Fields\\Field->meta()
#21 [internal function]: Illuminate\\Support\\HigherOrderCollectionProxy->Illuminate\\Support\\{closure}()
#22 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(600): array_map()
#23 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(778): Illuminate\\Support\\Arr::map()
#24 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php(59): Illuminate\\Support\\Collection->map()
#25 /usr/share/nginx/html/vendor/statamic/cms/src/Fields/Fields.php(306): Illuminate\\Support\\HigherOrderCollectionProxy->__call()
#26 /usr/share/nginx/html/vendor/statamic/cms/src/Fieldtypes/Bard.php(562): Statamic\\Fields\\Fields->meta()
#27 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(627): Statamic\\Fieldtypes\\Bard->Statamic\\Fieldtypes\\{closure}()
#28 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(826): Illuminate\\Support\\Arr::mapWithKeys()
#29 /usr/share/nginx/html/vendor/statamic/cms/src/Fieldtypes/Bard.php(559): Illuminate\\Support\\Collection->mapWithKeys()
#30 /usr/share/nginx/html/vendor/statamic/cms/src/Fields/Field.php(417): Statamic\\Fieldtypes\\Bard->preload()
#31 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php(60): Statamic\\Fields\\Field->meta()
#32 [internal function]: Illuminate\\Support\\HigherOrderCollectionProxy->Illuminate\\Support\\{closure}()
#33 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(600): array_map()
#34 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(778): Illuminate\\Support\\Arr::map()
#35 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php(59): Illuminate\\Support\\Collection->map()
#36 /usr/share/nginx/html/vendor/statamic/cms/src/Fields/Fields.php(306): Illuminate\\Support\\HigherOrderCollectionProxy->__call()
#37 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Controllers/CP/Collections/EntriesController.php(484): Statamic\\Fields\\Fields->meta()
#38 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Controllers/CP/Collections/EntriesController.php(264): Statamic\\Http\\Controllers\\CP\\Collections\\EntriesController->extractFromFields()
#39 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Statamic\\Http\\Controllers\\CP\\Collections\\EntriesController->update()
#40 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\\Routing\\Controller->callAction()
#41 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(259): Illuminate\\Routing\\ControllerDispatcher->dispatch()
#42 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\\Routing\\Route->runController()
#43 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(806): Illuminate\\Routing\\Route->run()
#44 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()
#45 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/DeleteTemporaryFileUploads.php(18): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#46 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\DeleteTemporaryFileUploads->handle()
#47 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/CP/AddVaryHeaderToResponse.php(11): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#48 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\AddVaryHeaderToResponse->handle()
#49 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/CP/CountUsers.php(18): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#50 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\CountUsers->handle()
#51 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/CP/BootUtilities.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#52 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\BootUtilities->handle()
#53 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/CP/BootPreferences.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#54 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\BootPreferences->handle()
#55 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/CP/BootPermissions.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#56 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\BootPermissions->handle()
#57 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/CP/SelectedSite.php(15): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#58 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\SelectedSite->handle()
#59 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/CP/Localize.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#60 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\Localize->handle()
#61 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/CP/Authorize.php(25): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#62 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\Authorize->handle()
#63 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/CP/AddToasts.php(22): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#64 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\AddToasts->handle()
#65 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/CP/AuthGuard.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#66 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\AuthGuard->handle()
#67 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/CP/ContactOutpost.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#68 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\ContactOutpost->handle()
#69 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#70 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle()
#71 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#72 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle()
#73 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#74 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle()
#75 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#76 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest()
#77 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Session\\Middleware\\StartSession->handle()
#78 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#79 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle()
#80 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#81 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle()
#82 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/SwapExceptionHandler.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#83 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\SwapExceptionHandler->handle()
#84 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#85 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(805): Illuminate\\Pipeline\\Pipeline->then()
#86 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(784): Illuminate\\Routing\\Router->runRouteWithinStack()
#87 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(748): Illuminate\\Routing\\Router->runRoute()
#88 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(737): Illuminate\\Routing\\Router->dispatchToRoute()
#89 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\\Routing\\Router->dispatch()
#90 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#91 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/StopImpersonating.php(12): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#92 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\StopImpersonating->handle()
#93 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/DisableFloc.php(17): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#94 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\DisableFloc->handle()
#95 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/CheckMultisite.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#96 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CheckMultisite->handle()
#97 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/CheckComposerJsonScripts.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#98 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CheckComposerJsonScripts->handle()
#99 /usr/share/nginx/html/vendor/statamic/cms/src/Http/Middleware/PoweredByHeader.php(18): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#100 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\PoweredByHeader->handle()
#101 /usr/share/nginx/html/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#102 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle()
#103 /usr/share/nginx/html/vendor/withcandour/aardvark-seo/src/Http/Middleware/RedirectsMiddleware.php(16): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#104 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): WithCandour\\AardvarkSeo\\Http\\Middleware\\RedirectsMiddleware->handle()
#105 /usr/share/nginx/html/app/Http/Middleware/SetGlobalDefaults.php(29): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#106 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\\Http\\Middleware\\SetGlobalDefaults->handle()
#107 /usr/share/nginx/html/app/Http/Middleware/SetDefaultLocaleForUrls.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#108 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\\Http\\Middleware\\SetDefaultLocaleForUrls->handle()
#109 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#110 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#111 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle()
#112 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#113 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#114 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle()
#115 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#116 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle()
#117 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(99): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#118 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle()
#119 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#120 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\HandleCors->handle()
#121 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#122 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\TrustProxies->handle()
#123 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustHosts.php(48): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#124 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\TrustHosts->handle()
#125 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#126 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\\Pipeline\\Pipeline->then()
#127 /usr/share/nginx/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#128 /usr/share/nginx/html/public/index.php(51): Illuminate\\Foundation\\Http\\Kernel->handle()
#129 {main}
"}

Environment

Environment
Application Name: myapp
Laravel Version: 10.48.20
PHP Version: 8.3.1
Composer Version: 2.6.6
Environment: dev
Debug Mode: ENABLED
URL: myapp.test
Maintenance Mode: OFF

Cache
Config: CACHED
Events: CACHED
Routes: CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / daily, stderr
Mail: smtp
Queue: redis
Session: file

Statamic
Addons: 5
Antlers: runtime
Sites: 8 (English, Dutch, Spanish, and 5 more)
Stache Watcher: Disabled
Static Caching: half
Version: 4.58.2 PRO

Statamic Addons
appswithlove/statamic-one-click-content-translation: 4.63.0
aryehraber/statamic-impersonator: 2.6.0
spatie/statamic-responsive-images: 4.1.1
statamic-rad-pack/meilisearch: 3.2.1
withcandour/aardvark-seo: 3.0.1

Installation

Existing Laravel app

Additional details

Multisite-setup

@duncanmcclean
Copy link
Member

What do your custom routes look like? Are you looping through entries?

@geertjanknapen1
Copy link
Author

Hey Duncan, that's basically correct.

We get the current routes from the route facade.
Then we get all the entries in the Dynamic Pages collection.

Then we create a new route using Laravel's Route class, then, we add those routes dynamically.

public function generateDynamicRoutes(): void
    {
        $routes = RouteFacade::getRoutes();
        $dynamicPageEntries = $this->contentService->getCollectionEntries(Collection::DYNAMIC_PAGES, ['title', 'url']);

        /** @var Entry $pageEntry */
        foreach ($dynamicPageEntries as $pageEntry) {
            $locale = trim($pageEntry->locale());
            $pageSlug = trim($pageEntry->slug());

            if ($this->hasPublicRoute($pageSlug)) {
                // Make sure to check originValue here in case the URL is not yet localized for non-EN entries.
                if ($pageEntry->originValue('url') !== null) {
                    if (Str::startsWith($uri = trim($pageEntry->originValue('url')), '/')) {
                        $uri = Str::replaceFirst('/', '', $uri);
                    }

                    $dynamicRoute = new Route(
                        Request::METHOD_GET,
                        "/$locale/$uri",
                        [
                            'uses' => 'App\Http\Controllers\DynamicPageController@showPage',
                            'controller' => 'App\Http\Controllers\DynamicPageController@showPage',
                            'as' => "$locale.$pageSlug",
                        ]
                    );

                    $routes->add($dynamicRoute)->middleware('web')->setContainer(app());
                } else {
                    Log::log('debug', __METHOD__ . ' | URL skipped for' . ($pageSlug ?? '-not set-'));
                }
            }
        }
    }

Which in turn gives us routes like >
image

@duncanmcclean
Copy link
Member

I wouldn't really recommend looping through stuff to create routes. There's probably a better way of doing what you're trying to achieve. 🤔

Why are you using a custom controller, rather than relying on Statamic's routing?

@geertjanknapen1
Copy link
Author

Due to the nature of the content on some of the pages, we need extra control regarding what we can/can not show, we also want custom URLs, not based on a slug.
Cannabis content, for example, should not be shown in certain countries.

But I don't think the routing is the root cause of the issue here. I don't think it has anything to do with it at all.

Even if I did use Statamic routing, using Artisan::call('route:cache'); should still fail when called from a listener upon saving of an Entry in a collection which blueprint's contains an Entries fieldtype, the routing doesn't have any effect on that part right?

Somehow, below code in vendor/statamic/cms/src/Fieldtypes/Entries is executed when calling Artisan::call('route:cache'); which expects a $user, which it obviously doesn't have.

protected function getCreatables()
    {
        if ($url = $this->getCreateItemUrl()) {
            return [['url' => $url]];
        }

        $collections = $this->getConfiguredCollections();

        $user = User::current();

        return collect($collections)->flatMap(function ($collectionHandle) use ($collections, $user) {
            $collection = Collection::findByHandle($collectionHandle);

            throw_if(! $collection, new CollectionNotFoundException($collectionHandle));

            if (! $user->can('create', [EntryContract::class, $collection])) {
                return null;
            }

            $blueprints = $collection->entryBlueprints();

            return $blueprints
                ->reject->hidden()
                ->map(function ($blueprint) use ($collection, $collections, $blueprints) {
                    return [
                        'title' => $this->getCreatableTitle($collection, $blueprint, count($collections), $blueprints->count()),
                        'url' => $collection->createEntryUrl(Site::selected()->handle()).'?blueprint='.$blueprint->handle(),
                    ];
                });
        })->all();
    }

@duncanmcclean
Copy link
Member

Are you able to provide a stack trace of the error you're seeing? The getCreatables method should only get called in the Control Panel.

@geertjanknapen1
Copy link
Author

I added an error log in the issue, with a stack trace, is this sufficient?

@geertjanknapen1
Copy link
Author

geertjanknapen1 commented Oct 21, 2024

@duncanmcclean Snuck away some time from another project, it is re-creatable on another (basically new) install of Statamic, running on 4.58.2. This site does not use the fancy dynamic_pages setup, it's a base install of Statamic setup as multi-site.
I do intend to test on 5.x, but I simply don't have the time during work.

I get the same error as described in the issue. Here's another stack-trace.

[2024-10-21 10:02:35] local.ERROR: Call to a member function can() on null {"exception":"[object] (Error(code: 0): Call to a member function can() on null at /home/webdev/www/base-install/vendor/statamic/cms/src/Fieldtypes/Entries.php:278)
[stacktrace]
#0 [internal function]: Statamic\\Fieldtypes\\Entries->Statamic\\Fieldtypes\\{closure}()
#1 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(600): array_map()
#2 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(777): Illuminate\\Support\\Arr::map()
#3 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(404): Illuminate\\Support\\Collection->map()
#4 /home/webdev/www/base-install/vendor/statamic/cms/src/Fieldtypes/Entries.php(292): Illuminate\\Support\\Collection->flatMap()
#5 /home/webdev/www/base-install/vendor/statamic/cms/src/Fieldtypes/Relationship.php(134): Statamic\\Fieldtypes\\Entries->getCreatables()
#6 /home/webdev/www/base-install/vendor/statamic/cms/src/Fieldtypes/Entries.php(432): Statamic\\Fieldtypes\\Relationship->preload()
#7 /home/webdev/www/base-install/vendor/statamic/cms/src/Fields/Field.php(417): Statamic\\Fieldtypes\\Entries->preload()
#8 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php(60): Statamic\\Fields\\Field->meta()
#9 [internal function]: Illuminate\\Support\\HigherOrderCollectionProxy->Illuminate\\Support\\{closure}()
#10 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(600): array_map()
#11 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(777): Illuminate\\Support\\Arr::map()
#12 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php(61): Illuminate\\Support\\Collection->map()
#13 /home/webdev/www/base-install/vendor/statamic/cms/src/Fields/Fields.php(306): Illuminate\\Support\\HigherOrderCollectionProxy->__call()
#14 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Controllers/CP/Collections/EntriesController.php(484): Statamic\\Fields\\Fields->meta()
#15 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Controllers/CP/Collections/EntriesController.php(264): Statamic\\Http\\Controllers\\CP\\Collections\\EntriesController->extractFromFields()
#16 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Statamic\\Http\\Controllers\\CP\\Collections\\EntriesController->update()
#17 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\\Routing\\Controller->callAction()
#18 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Routing/Route.php(260): Illuminate\\Routing\\ControllerDispatcher->dispatch()
#19 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\\Routing\\Route->runController()
#20 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Routing/Router.php(806): Illuminate\\Routing\\Route->run()
#21 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()
#22 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/DeleteTemporaryFileUploads.php(18): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#23 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\DeleteTemporaryFileUploads->handle()
#24 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/CP/AddVaryHeaderToResponse.php(11): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#25 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\AddVaryHeaderToResponse->handle()
#26 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/CP/CountUsers.php(18): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#27 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\CountUsers->handle()
#28 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/CP/BootUtilities.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#29 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\BootUtilities->handle()
#30 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/CP/BootPreferences.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#31 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\BootPreferences->handle()
#32 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/CP/BootPermissions.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#33 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\BootPermissions->handle()
#34 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/CP/SelectedSite.php(15): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#35 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\SelectedSite->handle()
#36 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/CP/Localize.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#37 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\Localize->handle()
#38 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/CP/Authorize.php(25): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#39 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\Authorize->handle()
#40 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/CP/AddToasts.php(22): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#41 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\AddToasts->handle()
#42 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/CP/AuthGuard.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#43 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\AuthGuard->handle()
#44 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/CP/ContactOutpost.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#45 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CP\\ContactOutpost->handle()
#46 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#47 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle()
#48 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#49 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle()
#50 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#51 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle()
#52 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#53 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest()
#54 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Session\\Middleware\\StartSession->handle()
#55 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#56 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle()
#57 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#58 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle()
#59 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/SwapExceptionHandler.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#60 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\SwapExceptionHandler->handle()
#61 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#62 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Routing/Router.php(807): Illuminate\\Pipeline\\Pipeline->then()
#63 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Routing/Router.php(784): Illuminate\\Routing\\Router->runRouteWithinStack()
#64 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Routing/Router.php(748): Illuminate\\Routing\\Router->runRoute()
#65 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Routing/Router.php(737): Illuminate\\Routing\\Router->dispatchToRoute()
#66 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\\Routing\\Router->dispatch()
#67 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#68 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/StopImpersonating.php(12): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#69 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\StopImpersonating->handle()
#70 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/DisableFloc.php(17): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#71 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\DisableFloc->handle()
#72 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/CheckMultisite.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#73 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CheckMultisite->handle()
#74 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/CheckComposerJsonScripts.php(14): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#75 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\CheckComposerJsonScripts->handle()
#76 /home/webdev/www/base-install/vendor/statamic/cms/src/Http/Middleware/PoweredByHeader.php(18): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#77 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Statamic\\Http\\Middleware\\PoweredByHeader->handle()
#78 /home/webdev/www/base-install/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#79 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle()
#80 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#81 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#82 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle()
#83 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#84 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#85 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle()
#86 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#87 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle()
#88 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(99): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#89 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle()
#90 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#91 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\HandleCors->handle()
#92 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#93 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\TrustProxies->handle()
#94 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#95 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\\Pipeline\\Pipeline->then()
#96 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#97 /home/webdev/www/base-install/public/index.php(52): Illuminate\\Foundation\\Http\\Kernel->handle()
#98 /home/webdev/www/base-install/vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php(16): require_once('...')
#99 {main}
"} 

@duncanmcclean
Copy link
Member

Thanks!

We'll take a look when we can.

@geertjanknapen1
Copy link
Author

Thanks, Duncan!
If you need anything else, fire away, happy to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants