magento / magento2-phpstorm-plugin

PHPStorm Plugin for Magento 2
Open Software License 3.0
435 stars 102 forks source link

Empty "Overwrite in project theme" pop-up message when overwriting .phtml #946

Closed zehsebasl closed 2 years ago

zehsebasl commented 2 years ago

Describe the bug (*) When overwriting a phtml file, the theme selector is empty.

To Reproduce (*)

Go to vendor Open Module Catalog View > frontend > templates > product > list.phtml right-click > "Overwrite this template in a project theme" > *click

Expected behavior (*) I Expected to be able to select a theme. The theme resides within app/code/design/{vendor}/{theme-name}/theme.xml

Screenshots image

Please complete the following information: (*)

Additional context

I used Mark Susht Docker script for local development. https://github.com/markshust/docker-magento

m2-assistant[bot] commented 2 years ago

Hi @zehsebasl. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


bohdan-harniuk commented 2 years ago

Hello, @zehsebasl!

Thank you for your report! We will try to fix this issue as soon as possible.

Will you be able to test in your local environment whether the fix works by installing alpha release?

Regards,

zehsebasl commented 2 years ago

Hello, @zehsebasl!

Thank you for your report! We will try to fix this issue as soon as possible.

Will you be able to test in your local environment whether the fix works by installing alpha release?

Regards,

I will look into this and come back at you.

bohdan-harniuk commented 2 years ago

Thank you, @zehsebasl!

I will ping you just after we fix this and publish new alpha release!

Regards,

Iamwade commented 2 years ago

@magento I am working on this

zehsebasl commented 2 years ago

Thank you, @zehsebasl!

I will ping you just after we fix this and publish new alpha release!

Regards,

Thank you for helping me @bohdan-harniuk. I'm sorry. I followed the steps to run 4.3.0-develop locally, but it seems I require Intellij Ultimate. I don't have that, just the regular Phpstorm. So therefor, I cannot test branch 4.3.0 at this moment.

Iamwade commented 2 years ago

HI @zehsebasl Thank you for your report! please specify in your theme there is a registration.php file?

bohdan-harniuk commented 2 years ago

@zehsebasl, you didn't get what I asked for)

We will try to fix this issue and I will publish new ALPHA release. After that I will ask you to install that release and checking if everything is fine.

So, please, help @Iamwade to reproduce it.

We will take care about development part.

Regards,

zehsebasl commented 2 years ago

HI @zehsebasl Thank you for your report! please specify in your theme there is a registration.php file?

Our registration is:

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/{vendor}/{themename1/3}_{themename2/3_{themename3/3}',
    __DIR__
);

I could imagine having "_" inside the componentName is not wise, but it's technically allowed as this theme is currently active. So I tried renaming the componentName to the following:

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/{vendor}/{themename}',
    __DIR__
);

It results in the same issue. The modal with dropdown to select a theme is still empty.

Here is an additional screenshot of our theme folder structure: image

Iamwade commented 2 years ago

@zehsebasl Thanks for your screenshots. image

Is the first letter in the theme title with a capital letter?

zehsebasl commented 2 years ago

@Iamwade

Yes, That is correct. Both in the registration and the folder name contain capitalization.

I tried mixing the typography to see if this resolves the issue, removing capitalization in the registration.php and folder name did not resolve the issue unfortunately.

I tried opening other projects we have and in one particular project, the dropdown worked. So i'm going to compare the theme files/structure to see why one is working and the other is not.

This proves to me that there is no "issue" with the plugin but that the problem resides within our own configuration of that project. image

I will close this issue; and report the difference when I have more time so that other people having this issue can see what the difference was as well.