سؤال

I'm struggling with an issue for hours now and I really don't get it.

I'm using Magento 2.2.1 in developer mode and my scripts symlinks are not created.

Here is my project structure

--app/
----design/
------frontend/
--------vendor_name/
----------theme_name/
------------web/
--------------css/
----------------source/
------------------(all less files) - symlinks works
--------------js/
----------------source/
------------------app.js (entry point)
------------------utils/
------------------(rest of scripts)

FYI, I use gulp instead of grunt but it works juste the same.

So when I use $ gulp exec --theme_name the less files symlinks are well generated but the rest of the theme is not.

When I go on my application, the theme folder in pub/static is populated with other theme's assets but nether with my scripts.

I searched many things and tried to change in app/etc/di.xml the following entry :

<virtualType name="developerMaterialization" type="Magento\Framework\App\View\Asset\MaterializationStrategy\Factory">
    <arguments>
        <argument name="strategiesList" xsi:type="array">
            <item name="view_preprocessed" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink</item>
            <item name="default" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink</item>
        </argument>
    </arguments>
</virtualType>

currently in my di.xml

But nothing.

I also tried to deploy static static-content, source-theme, nothing.

I think I'm not really understanding those core functionality and what they really do.

Does anyone have an idea regarding this issue ?

Thanks

هل كانت مفيدة؟

المحلول

https://github.com/davidalger/capistrano-magento2/issues/98 Supposedly fixed in newer version of Magento 2.2.5+ ?

I have seen the symlinks from nginx work on 2.3 but 2.2.5 symlinks not working for some reason.

If on windows, run web server as administrator e.g. xampp control then start apache.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top