magento2.3.3 – Magento 2.3 – For testing how to use localhost url into nginx configuration

For testing, we using Magento 2.3.4 in localhost [Centos 7 & Nginx]

Main-store Path & URL:

Path : usr/share/nginx/html/gomart – URL : http:// 192.168.1.64:8077/

Multi-Store URL :

Path : usr/share/nginx/html/gomart/grocery – URL : http:// 192.168.1.64:8077/grocery/

How to setup Multi-Website url into => nginx.conf.sample & index.php & .htaccess

magento2.3.3 – Magento 2.3 – For Multi Website where should be create Symbolic links folder – Root folder or Pub folder?

I just want to create multi-website, i read some links to guide me to create a subfolder and create symbolic links of app,pub,lib,var and copy index.php & .htaccess from root folder to a subfolder.

Here where i can create a subfolder Root folder or Pub folder?

This guide leads to create under Root folder => https://meetanshi.com/blog/setup-magento-2-multi-store/

This guide leads to create under Pub folder => https://magento.stackexchange.com/a/198257/57334

Which one should I follow?

And how to add my localhost URL to my Nginx configuration, most of the documents and online links teach only live URL.

My single store Nginx Configuration :

server {
listen 8087;
server_name gomart;
set $MAGE_ROOT /usr/share/nginx/html/gomart;
include /usr/share/nginx/html/gomart/nginx.conf.sample;
error_log /usr/share/nginx/html/gomart/gomart_error.log;
access_log /usr/share/nginx/html/gomart/gomart_access.log;
set $MAGE_RUN_TYPE website;
}

upstream fastcgi_backend2 {
server 127.0.0.1:9000;
}

magento2.3.3 – Magento 2.3 Migration – Centos 7 – Nginx – SSL_ERROR_RX_RECORD_TOO_LONG Error

I just migrated my live Magento 1.9 to centos 7 – Nginx localhost, after migrated successfully i am getting the following error,

An error occurred during a connection to 192.168.1.64:8085. SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG

https://snipboard.io/fwTNaI.jpg

Magento2.3.3 Exclude particular script from moving to footer

Magento2.3.3 I am using Magento default

Move JS code to the bottom of the page

to move js to bottom. But how can I exclude only 1 script.

magento2.3.3 – How to add new custom fields in the existing GraphQL API (Query and Mutuation)?

I have basic knowledge of GraphQL. Now, I would like to turn my knowledge into action. For that, I want to know a few things, like how can I add my custom field to any GraphQL queries and mutations. I've also read some blog posts for this, but they don't have the proper guidance I'm looking for.

Can anyone explain with an example of an existing GraphQL API extension for both queries and mutations? That would be very useful.

Thanks in advance!

Magento2.3.3 – Configurable product edit time, Size attribute does not remain selected

I found a problem in the product edit page in the default version of Magento 2.3.3.

I have added 1 configurable product to the cart with Size and Colour attributes.

Once i click on the Edit link, I land on the product edit page, but the Size the attribute was not only selected Colour The attribute remains selected.

Has anyone fixed this?

enter the image description here

magento2.3.3 – Send event fires twice

I created a custom watcher on the customer_address_save_after event that retrieves the customer data and sends it via SOAP. So far so good.

My file Vendor/Module/etc/events.xml



    
        
    

Furthermore, I also need a custom button on the backend that performs the same action manually. So I created my VendorModuleControllerAdminhtmlCustomerSend.php controller:

    public function __construct(
        MagentoBackendAppActionContext $context,
        MagentoFrameworkViewResultPageFactory $pageFactory,        
        MagentoCustomerApiCustomerRepositoryInterface $customer,        
        MagentoCustomerModelAddress $address       
    )
    {
        $this->_pageFactory = $pageFactory;
        $this->logger = $logger;
        $this->dir = $dir;
        $this->ioFile = $ioFile;
        $this->customer = $customer;
        $this->address = $address;
        $this->soapCustomer = $soapCustomer;
        $this->helper = $helper;
        return parent::__construct($context);
    }

    /**
     * Index action
     *
     * @return MagentoFrameworkViewResultPage
     */
    public function execute()
    {
        $resultRedirect = $this->resultRedirectFactory->create();
        try {
             // Fecth customer info
            $customerId = $this->getRequest()->getParam('customer_id');
            if (!$customerId) {                
                $this->messageManager->addErrorMessage(__('Customer was not defined'));
                return $resultRedirect->setUrl($this->_redirect->getRefererUrl());
            }

            $customer = $this->customer->getById($customerId);            
            // If customer doesn't have address, can't be processed
            if (!$customer->getDefaultBilling()) {
               $this->messageManager->addErrorMessage(__('Error: Customer doesn't have an address'));
                return $resultRedirect->setUrl($this->_redirect->getRefererUrl());
            }

            $this->address->setCustomerId($customerId);
            $this->address->setId($customer->getDefaultShipping());
            $this->address->setIsDefaultBilling(true);
            $this->_eventManager->dispatch(
                'customer_address_save_after',
                ('customer_address' => $this->address)
            );            
        } catch (Exception $e) {           
            // display error message
            $this->messageManager->addErrorMessage('Error: ' . $e->getMessage());
            // go back to customer edit
            return $resultRedirect->setUrl($this->_redirect->getRefererUrl());
        }

        $resultRedirect->setUrl($this->_redirect->getRefererUrl());
        return $resultRedirect;
    }

My idea is to send pre-defined events to do all the logic. However, I found out that the event is fired twice and also the address data is empty (customer data is ok, only the address is not full), so my custom event fails:

print_r($this->address->getData()); 
Array ( (parent_id) => 52 (customer_id) => 52 (entity_id) => 53 (id) => 53 (is_default_billing) => 1 )
print_r($this->address->getCustomer()->getData()); 
Array ( (entity_id) => 52 (website_id) => 1 (email) => name@domain.com (group_id) => 1 (increment_id) => (store_id) => 1 (created_at) => 2020-04-03 08:55:06 (updated_at) => 2020-04-13 10:46:45 (is_active) => 1 (disable_auto_group_change) => 0 (created_in) => Default Store View (prefix) => (firstname) => XXX (middlename) => (lastname) => XXX (suffix) => (dob) => yyyy-mm-dd (password_hash) => XXX (rp_token) => XXX (rp_token_created_at) => yyyy-mm-dd hh:mm:ss (default_billing) => 53 (default_shipping) => 53 (taxvat) => XXX (confirmation) => (gender) => (failures_num) => 0 (first_failure) => (lock_expires) => (reward_update_notification) => 1 (reward_warning_notification) => 1 (sforce_sync_status) => 0 (sforce_disable_sync) => 0 (sap_number) => XXX (apellido2) => XXX ) )

What am I missing? What is the best way to manually dispatch an event? I know I can save my client at this point too for the event to go off, but IMHO sending the event is the best approach.

Sincerely,
Antonio

magento2.3.3 – Unstable memory usage / mysql in 2.3.3, I can't find the problem

This is a Magento 2.3.3 that runs on the 4 GB memory drop of the Digital Ocean server, which should be enough, since it is the only thing hosted there. However, I have observed since the update to 2.3.3 from 2.3.0, there is some instability in the use of memory that then leads the site to fail with the Varnish cache or the http500 error during payment. The memory limit for Magento is set to 3 GB everywhere.

Below is the memory usage in the last 7 days:
7-day server memory chart

Normally, the memory usage should be less than 1 GB (without much traffic), however, I have noticed that there is a pattern in which memory would slowly accumulate up to about 2 GB, then something fails and returns to the normal range and then the cycle repeats

I ran the htop command, which I think mysql is using most of the memory and the connection time is more than an hour, I'm not sure if this is normal. However, upon restarting the mysql service, the memory would return to the normal range, which is approximately
htop screenshot

I am not sure how to solve this problem, so any help is appreciated.

magento2.3.3 – Magento 2.3.3 Configuration update release error

SQLSTATE (42000): syntax error or access violation: multiple 1068
Primary key defined, the query was: ALTER TABLE
rating_option_vote_aggregated MODIFY COLUMN primary_id int (11)
NOT NULL AUTO_INCREMENT COMMENT "Voting aggregation ID", ADD RESTRICTION
PRIMARY KEY (primary_id), ADD INDEX
MGTL_RATING_OPTION_VOTE_AGGREGATED_RATING_ID (rating_id), ADD
INDEX MGTL_RATING_OPTION_VOTE_AGGREGATED_STORE_ID (store_id)