Skip to content

Anchor link is wrongly classified as is_external #15081

Description

@strixTheCaptn

Bug description

Adding the following link to my navigation:
/#head-2 (anchor head-2 on home page)
has is_external=true

Image
array:16 [
  // resources/views/partials/nav_item.blade.php

  "entry_id" => Statamic\Fields\Value {
    #raw: null
    #handle: "entry_id"
    #fieldtype: null
    #augmentable: null
    #shallow: false
    -resolver: Closure(...) // Statamic\Structures\AugmentedPage
  }

  "id" => Statamic\Fields\Value {
    #raw: null
    #handle: "id"
    #fieldtype: null
    #augmentable: null
    #shallow: false
    -resolver: Closure(...) // Statamic\Structures\AugmentedPage
  }

  "permalink" => Statamic\Fields\Value {
    #raw: null
    #handle: "permalink"
    #fieldtype: null
    #augmentable: null
    #shallow: false
    -resolver: Closure(...) // Statamic\Structures\AugmentedPage
  }

  "title" => Statamic\Fields\Value {
    #raw: null
    #handle: "title"
    #fieldtype: null
    #augmentable: null
    #shallow: false
    -resolver: Closure(...) // Statamic\Structures\AugmentedPage
  }

  "uri" => Statamic\Fields\Value {
    #raw: null
    #handle: "uri"
    #fieldtype: null
    #augmentable: null
    #shallow: false
    -resolver: Closure(...) // Statamic\Structures\AugmentedPage
  }

  "url" => Statamic\Fields\Value {
    #raw: null
    #handle: "url"
    #fieldtype: null
    #augmentable: null
    #shallow: false
    -resolver: Closure(...) // Statamic\Structures\AugmentedPage
  }

  "children"    => []
  "depth"       => 1
  "index"       => 0
  "count"       => 1
  "first"       => true
  "last"        => false
  "is_current"  => false
  "is_parent"   => true
  "is_external" => true
  "parent"      => null
]

How to reproduce

  • Add navigation item
  • Set to "/#anchor"
  • Dump the item with this snippet:
        <statamic:nav:main as="item">
            @dump($item)
        </statamic:nav:main>

Logs

Environment

$ php please support:details

Environment
Laravel Version: 12.64.0
PHP Version: 8.5.8
Composer Version: 2.10.2
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: de

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

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Storage
public/storage: NOT LINKED

Livewire
Livewire: v4.3.3

Statamic
Addons: 4
License Key: Not set
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 6.26.0 PRO

Statamic Addons
captns/statadash-reporter: 0.1.1
marcorieser/statamic-livewire: 5.3.1
reachweb/statamic-livewire-filters: 4.5.1
spatie/statamic-responsive-images: 6.2.0

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions