rainlab / pages-plugin

Adds static pages and menus
MIT License
121 stars 100 forks source link

[Safari browser] The inspectable class name is not specified. #498

Closed Dahfrenk closed 1 year ago

Dahfrenk commented 2 years ago

Description:

When adding a component to the StaticPages snippet with registerPageSnippets it shows up just fine in the snippet list. The moment you click to add the component to the page and have a GetOptions for a dropdown property in there that gets a list from the model, it throws the 'The inspectable class name is not specified.' error. If I remove the property and add the snippet to the page and readd the property once the component is added, the list loads just fine.

Steps To Reproduce:

In your component have a similar dropdown:

    public function defineProperties()
    {
        return [
            'priceTable' => [
                'title'       => 'artisans.pricetables::lang.strings.pricetable',
                'type'        => 'dropdown',
                'required'    => true
            ]
        ];
    }

    public function getPriceTableOptions()
    {
        return PriceTableModel::orderBy('name')->lists('name', 'id');
    }

Try to add the component to a static page once it is registered in the register Page Snippets. It works fine to load the list once it is added and you wish to modify it or when triggering it from the CMS pages. It just does not work when newly adding it to a static page.

Dahfrenk commented 2 years ago

I have noticed that when you check checkboxes when adding a component snippet, and click the snippet after adding it, the properties have reset to their default values.

Dahfrenk commented 2 years ago

I found out this behavior is triggered in safari. In Chrome the component properties popup don't trigger on adding a component.

daftspunk commented 1 year ago

This should be fixed in v3.4 as part of the snippet implementation rewrite; it was tested in Safari.