0

I have created more attributes and assigned the scope view value "website". There is only one website. Recently, I upgraded my server. After that, the "global" scope attributes only show up in the front-end. Why are the "website" scope attribute contents not showing in the front-end?

1
  • Could you update the question with more details and what you have found from your end? Commented Jun 21, 2023 at 10:56

5 Answers 5

0

So did you add the product attributes? Did you try to display them on the product page or cart page?

If you want to display them on the cart or checkout page, you must define them in the XML to use them. app/code/custom-name/module/etc/catalog_Attributes.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/catalog_attributes.xsd">
    <group name="quote_item">
        <attribute name="custom_Attribute_1"/>
        <attribute name="custom_Attribute_2"/>
        
    </group>
</config>
0

did you use the below commands after upgrade the server:

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy

php bin/magento indexer:reindex

php bin/magento cache:flush

It seems some server caching issue.

Also again set the attributes to website and save the changes one by one and see if the issue is resolved.

2
  • yes i did run these commands. php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f chmod -R 777 var/ generated/ pub/ php bin/magento indexer:reindex php bin/magento cache:clean php bin/magento cache:flush chmod -R 777 var/* generated/* pub/* vendor/*
    – saravankg
    Commented Jun 19, 2023 at 9:33
  • So please again set the website scope for attributes to 'website' and save theme from the admin panel and flush the cache to see if issue is fixed. Also you can set the scope for those attributes to global since you only have one website. But if they didn't work, I assume that there is some server incompatibility. Kindly check it with your server administrators and ask them if any server configuration has changes after upgrade.
    – Armi_Raz
    Commented Jun 19, 2023 at 9:54
0

(Please ignore it if it not work)

Check if you have enabled single store

Step 1. Log into your Admin Panel and navigate to Stores > Settings > Configuration.

Step 2. Open the General tab and go to the Single-Store Mode section at the bottom of the page.

Step 3. Select No in the Enable Single-Store Mode field.

Thanks

0
  1. Check if the upgraded server has the correct configuration settings for displaying the "website" scope attributes. Ensure that the server is properly configured to fetch and display the attribute contents from the "website" scope.
  2. If your website employs caching mechanisms, the attribute changes might not be immediately visible on the front end. Clear any caches that might be storing previous versions of the website's content, so that the updated attribute values can be fetched and displayed.
  3. During the server upgrade, there might have been an issue with migrating the attribute data related to the "website" scope. Verify that the attribute values were successfully transferred to the upgraded server and are accessible in the correct location.
  4. Check if the front-end code responsible for displaying the attributes has been updated to accommodate the changes made during the server upgrade. Make sure that the code references the correct attribute scope and that it is retrieving and rendering the values correctly.
  5. Confirm that the necessary access controls and permissions are properly set for the "website" scope attributes. Ensure that the front end has the appropriate authorization to fetch and display these attributes.
  6. Review the server logs and error messages to identify any potential issues or errors that might be preventing the "website" scope attributes from being displayed. This can provide valuable insights into the root cause of the problem.
0

If you have recently upgraded your server and the "website" scope attributes are not showing in the front-end, there are a few possible reasons for this behavior:

  1. Cache Issue: After a server upgrade, it's essential to clear the cache to ensure the latest changes are reflected in the front-end. Make sure to flush the cache using the appropriate Magento CLI command:

    bin/magento cache:flush
    

    Additionally, you can try clearing the specific cache related to attribute metadata by running the following command:

    bin/magento cache:clean catalog_attributes
    

    This will ensure that any changes made to attribute scopes are properly updated in the cache.

  2. Indexing Issue: In some cases, attribute changes may not be immediately reflected in the front-end due to indexing. Try running the following command to reindex all the Magento indexes:

    bin/magento indexer:reindex
    

    This will update the necessary indexes, allowing the "website" scope attributes to show up correctly in the front-end.

  3. Website Configuration Issue: Verify that the website configuration is set correctly. Ensure that the website associated with the "website" scope attributes is properly configured and active. You can check this in the Magento Admin Panel under "Stores" > "Settings" > "Configuration" > "General" > "General" > "Locale Options" > "Locale".

  4. Attribute Visibility Configuration: Check the visibility settings of the "website" scope attributes. Ensure that the attributes are configured to be visible in the front-end. You can check this in the Magento Admin Panel under "Stores" > "Attributes" > "Product" > [Select Attribute] > "Storefront Properties" > "Visible on Catalog Pages on Storefront" and "Used in Product Listing".

By addressing these potential issues, you should be able to resolve the problem of "website" scope attributes not showing in the front-end after upgrading your server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.