magento2 – Magento 2.3.4 Open tab on button click

I’d like to create, on the product page, a button that leads to a specific tab with id = “exampleid”like “Be the first to review this product”.
The phtml file is this:

 <?php
// @codingStandardsIgnoreFile  

/** 
 * @var $block MagentoCatalogBlockProductView
 */
?>
<?php
    $_product = $block->getProduct();
?>
        <?php if($_product->getData('exampleattribute')==1){?>
            <div id="exampleid">
               <?php echo $this->getLayout()->createBlock('MagentoCmsBlockBlock')->setBlockId('exampleblock')->toHtml();?>
          </div>                 
        <?php } ?>

and the catalog_product_view.xml is this:

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="product.info.details">
            <block class="MagentoCatalogBlockProductView" name="example.tab" template="Vendor_extension::exampletab.phtml" group="detailed_info">
                <arguments>
                    <argument name="title" translate="true" xsi:type="string">Example tab</argument>
                    <argument name="sort_order" xsi:type="string">25</argument>                    
                </arguments>
            </block>
   </referenceBlock>
   </body>
</page>

what is the correct and clean way to create a link that calls the id of the tab?
Thanks a lot to everyone đŸ˜‰

Less file not included on frontend. Magento 2.3.4

I’ve got a really strange issue, If I choose to minify or merge css, then my site breaks, but not straight away, it seems to take some time and then eventually style-l.css just doesn’t get included on the frontend.

The file is still generated, but just not included on the front end, but it seems to happen after time (or after heavy load?).

I can’t see to work out why it wouldn’t be included. When the site breaks, the style-l.css link is still accessible – so it’s not as if the file is then missing.

Has anyone come across this before? Tearing my hair out as there are no error messages anywhere in the logs. I can’t even work out when the site will break or what I can do to make it break to begin testing, it’s completely random.

Using magento 2.3.4, Smartwave Porto theme patched to the latest version.

magneto2.3 – Magento 2.3.4 – 5 Not working with PHP 7.2 – 7.3 but working fine on PHP 7.1

Could you please someone help me I have newly setup VPS server as per Magneto 2 requirement i need PHP 7.2 or 7.3 to run Magneto 2.3.4 – 5.

But i m getting error when i m running Magneto 2.3.4 on PHP 7.3 other way Magneto 2.3.4 working fine on PHP 7.1 which is totally baseless.

Is there someone facing same issue can someone help me where i m doing wrong on new VPS server?

php – Magento 2.3.4: Exception # 0 Recoverable error: the object of the class Magento Framework App State Interceptor could not be converted into a string

I am using the code below to check which server in deployment mode is enabled. This throws the error. Please report the problem with the use of the object $this->_appState to get the mode. Thank you.

public function __construct(
        MagentoFrameworkViewElementTemplateContext $context,
        MagentoFrameworkAppState $appState,
        MagentoFrameworkFilesystem $fileSystem) {
    $this->_appState  = $appState->getMode();
    // Code to get the absolute path to the pub folder.
    $this->_pubPath = $fileSystem->getDirectoryRead(MagentoFrameworkAppFilesystemDirectoryList::PUB)->getAbsolutePath();
    parent::__construct($context);
}

/**
 * getAllPagesJSContent() returns the custom JS contents to calling custom allpages.js.
 * This function checks if the deployment mode is production or not, and returns
 * pmm/custom/js/allpages.min.js or pmm/custom/js/allpages.js
 *
 * @param void
 * @return string file contents or empty
 */
public function getAllPagesJSContent() {
    echo $this->_appState;
    // Check current environment. If it is the production retrieve the allpages.min.js file.
    if ($this->_appState == "production") {
        echo "Hello from production 1";
        if (($custom_js_file_contents = $this->get_custom_js_file_contents('allpages.min.js')) !== FALSE) {
            return $custom_js_file_contents;
        }
    }

magento2 – Magento 2.3.4 error after setup:upgrade command

Fatal error: Uncaught ReflectionException: Class MagentoFrameworkAppResourceConnectionProxy does not exist in /var/www/html/magento2/vendor/magento/framework/Code/Reader/ClassReader.php:26 Stack trace: #0 /var/www/html/magento2/vendor/magento/framework/Code/Reader/ClassReader.php(26): ReflectionClass->__construct('Magento\Framewo...') #1 /var/www/html/magento2/vendor/magento/framework/ObjectManager/Definition/Runtime.php(54): MagentoFrameworkCodeReaderClassReader->getConstructor('Magento\Framewo...') #2 /var/www/html/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(48): MagentoFrameworkObjectManagerDefinitionRuntime->getParameters('Magento\Framewo...') #3 /var/www/html/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(70): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create('Magento\Framewo...') #4 /var/www/html/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(167): MagentoFrameworkObjectManagerObjectManager->get('Mage in /var/www/html/magento2/vendor/magento/framework/Code/Reader/ClassReader.php on line 26

Everytime I use command:

bin/magento setup:upgrade

I had the error. After this command I use:

bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush

And site is working again.
Magento 2.3.4 installed on VPS server 4GB RAM, 50GB SSD. System is Ubuntu 18.04 using Nginx and Percona 5.7 and Elasticsearch 6.8.8 on same server. My php.ini configuration:

memory_limit = 2G

max_execution_time = 3600

max_input_time = 1800

upload_max_filesize = 10M

zlib.output_compression = On

I am using developer mode in Magento 2.3.4. What Can I check ? I installed CustomChekout module, and on this VPS serwer got error:

knockout.js:3381 Uncaught TypeError: Unable to process binding "foreach: function(){return {data:currentBillingAddress().customAttributes,as:'element'} }"
Message: Unable to process binding "text: function(){return $parent.getCustomAttributeLabel(element) }"
Message: Cannot read property 'customer-email' of undefined

at UiClass.getCustomAttributeLabel (billing-address.js:258)
at text (eval at createBindingsStringEvaluator (knockout.js:2982), <anonymous>:3:72)
at update (knockout.js:4659)
at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:3373)
at Function.evaluateImmediate_CallReadThenEndDependencyDetection (knockout.js:2173)
at Function.evaluateImmediate_CallReadWithDependencyDetection (knockout.js:2140)
at Function.evaluateImmediate (knockout.js:2101)
at Object.ko.computed.ko.dependentObservable (knockout.js:1954)
at knockout.js:3371
at Object.arrayForEach (knockout.js:159)

Where could be a problem ?

magento2 – Magento 2.3.4 – The status of the shipment is always empty

I am using Magento 2.3.4 and I see in the sales_shipment table that there is a field called shipping status. This field is empty, but if I look in the model, I saw that there is a default value "New". So how does this field work? – For my needs I need a state at the shimpment but I don't make it work!

Ideas?

Best André

Custom email template, use user ID. Magento 2.3.4

I want to use the username / username in personalized emails, when I use {{trans "% name," name = $ user.name}} , I receive an empty field.

Should I create custom variables for this data?

Reinstall Magento 2.3.4 on an existing store without losing products, categories, design, etc.

After installing a new theme as a new store view, most of my product images (around 1000) will not show up on the new store view. They show OK on the view of the original store with the old theme.
It is suggested that I probably have incorrect rewrites because when I look at the images I see that sometimes magento searches for them in the wrong cache folder and sometimes it looks for an image with the wrong name.
Additionally, some of the original store view images that are works don't exist in the magento cache folder at all, so they can't work, so it looks like they be retrieved from the cache, cdn or something.

the image resize command did not help.

Can reinstalling magento (2.3.4) help? without losing all my configurations?

magento2.3 – Magento 2.3.4 minicart content does not appear after removing the header wrapper from a client and adding a minicart block in a new container

Magento 2.3.4 getting an error unable to process the link if: function () {return getCartParam (& # 39; summary_count & # 39;)}

I deleted "header.panel.wrapper" and "header-wrapper" by default in my custom theme and overwritten default.html in Magento_checout to add a mini-cart in a different container "header.area", it displays count numbers but products and total are not displayed.

magento2 – Magento 2.3.4 multi-store client session transfer

I installed Fresh Magento 2.3.4 and set up multiple stores with websites on subdomains.
I want customers to log into a store and then automatically log in to another store on the subdomain.
I have set the cookie domain to like example.com (where the subdomain is sub.example.com). It does not work. In addition, the cookie domain has also been set to ".example.com", then the login pages for clients and administrators are reloaded on the login page again. Anyone have any idea?