Question

I update my magento webstore to 2.2.6 using following guide: https://devdocs.magento.com/guides/v2.0/comp-mgr/cli/cli-upgrade.html

Not everything seems to be fine. I have some css files that do not get generated (calendar.css for example). When I try to view the source of these files in the browser I get following error:

annot create a symlink for "C:/xampp/htdocs/magitas/lib/web/mage/calendar.css" and place it to "C:/xampp/htdocs/magitas/pub/static/frontend/Magento/luma/nl_NL/mage/calendar.css" Warning!symlink(): Cannot create symlink, error code(1314)

I tried changing the theme from my own theme to magento/luma but I got the same message.

I also tried the php bin/magento setup:static-content:deploy -f command but with the same result.

Was it helpful?

Solution

I found a solution in the app/etc/di.xml file I have changed the following

<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\Copy</item>
        </argument>
    </arguments>
</virtualType>

to:

<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\Copy</item>
            <item name="default" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Copy</item>
        </argument>
    </arguments>
</virtualType>

<item name="view_preprocessed"... has been modified in the above code.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top