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:detailsEnvironmentLaravel Version: 12.64.0PHP Version: 8.5.8Composer Version: 2.10.2Environment: localDebug Mode: ENABLEDMaintenance Mode: OFFTimezone: UTCLocale: deCacheConfig: NOT CACHEDEvents: NOT CACHEDRoutes: NOT CACHEDViews: CACHEDDriversBroadcasting: logCache: fileDatabase: sqliteLogs: stack / singleMail: smtpQueue: syncSession: fileStoragepublic/storage: NOT LINKEDLivewireLivewire: v4.3.3StatamicAddons: 4License Key: Not setSites: 1Stache Watcher: EnabledStatic Caching: DisabledVersion: 6.26.0 PROStatamic Addonscaptns/statadash-reporter: 0.1.1marcorieser/statamic-livewire: 5.3.1reachweb/statamic-livewire-filters: 4.5.1spatie/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