Skip to content

API webservices : Extensions with numbers in their name are not shown in call List of Component Configs: #45780

@ThomasFinnern

Description

@ThomasFinnern

Problem identified

When i want to see the configuration parameters of my rsgallery2 extension (just alive but barely working) then i get a resource not not found

When i call curl apiPath: 'v1/config/com_rsgallery2' then it responds with

{
    "errors": [
        {
            "title": "Resource not found",
            "code": 404
        }
    ]
}

I found the error in file plugins/webservices/config/src/Extension/Config.php at the end

new Route(['GET'], 'v1/config/:component_name', 'component.displayList', ['component_name' => '([A-Za-z_]+)'], $getDefaults),
new Route(['PATCH'], 'v1/config/:component_name', 'component.edit', ['component_name' => '([A-Za-z_]+)'], $defaults),

Proposed solution

The regex [A-Za-z_] should be [A-Za-z0-9_] on both lines
It has worked on my tests

Open questions

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