Questions tagged [php-7.2]

Marks questions related to Magento on php 7.2

Filter by
Sorted by
Tagged with
16
votes
15answers
7k views

SUPEE-10975 Potential Issues

SUPEE-10975 has been released, it would be great to know if anyone runs into any issues while trying to apply this, will this conflict with the most recent patch that adds 7.2 support? So far these ...
8
votes
6answers
17k views

Magento 2.3.0 “A technical problem with the server created an error.” When uploading the logo image

I'm using Magento 2.3.0, with php 7.2 version, on a ubuntu os. Everything looks working fine, but when I try to go into Magento backend, Content - Design/Configuration - Header, and I try to upload ...
8
votes
5answers
27k views

The each() function is deprecated. Magento 2 , php 7.2

I have been getting this error since I changed to PHP-7.2 Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /var/www/html/vedic/vendor/...
6
votes
4answers
1k views

How to override model in magento2?

I want to remove the below lines in Magento\Quote\Model\PaymentMethodManagement model file if (!$this->zeroTotalValidator->isApplicable($payment->getMethodInstance(), $quote)) { ...
6
votes
3answers
17k views

each() function deprecated php 7.2 , magento 2 [duplicate]

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /vendor/magento/zendframework1/library/Zend/Cache/Backend.php on line 79 this function showing on ...
6
votes
2answers
13k views

Magento 2.2 is not working in PHP 7.2.0

I am working on Magento 2.2. Recently I updated my PHP version to 7.2.0, then i am facing the Warning like this: My file.php is : <?php /* ==New BSD License== Copyright (c) 2012, Colin ...
6
votes
1answer
143 views

How to add class in ko template in magento2

I want to add class in ko template In js: define([ 'jquery', 'ko', 'uiComponent', 'underscore', 'mage/translate', 'mage/storage', '...
4
votes
2answers
806 views

How to add the option value for the product attribute in magento2

How to give the option value for the product attribute programmatically. I need to give the option value for manufacturer attribute drop down field. I have created admin grid for manufacturer ...
4
votes
2answers
3k views

Warning: count(): Parameter must be an array or an object that implements Countable

I have this code: public function getCounter() { /** @var \Amasty\ShopbyPage\Model\Page $model */ $model = $this->_coreRegistry->registry(RegistryConstants::PAGE); ...
3
votes
1answer
2k views

Magento 2.3.1 - Issue with catalog search when using php7.2-fpm

When we search any string from the search text box, We have encountered a 500 server error into the search result page in our live web site or search page getting blank. When we check in logs or ...
3
votes
2answers
2k views

Remove the attribute programmatically in magento2?

I want delete the existing attribute called Manufacturer. Check if this attribute exists before deleting. How to do this. Thanks.
3
votes
1answer
70 views

Database schema related change reverted

I have one of my Magento 2 projects running with version 2.3.3. There are so many simple products for one single configurable product and as a result, there is an issue with the length of the SKU. To ...
3
votes
1answer
124 views

PHP 7.X vulnerability and Magento 1.7

As many of you know there are multiple vulnerabilities that pertain to PHP 7.1, 7.2, and 7.3. I currently run PHP 5.6 with Magento 1.7. I am pretty confident that 1.7 does NOT support any of the ...
3
votes
0answers
2k views

PHP Fatal error: Uncaught Error: Class 'DOMDocument' not found in /vendor/magento/framework/Config/Dom.php:390

DOM package already install. also follows: sudo apt-get update then install php7.2-dom
2
votes
2answers
126 views

Call Custom function after binding customer name in magento2?

I have updated the customer name using ko. After binding customer name, I want to add one custom class. <li class="customer-welcome"> <span class="customer-name" role="...
2
votes
2answers
977 views

Extension Installation Readiness Check Error Magento 2.3.1

There are several errors when I'm trying to install an extension (Slider Banner Module) for the first time. The picture below shows the error in the readiness check. I'm using GoDaddy > C-Panel > ...
2
votes
1answer
2k views

Magento 2.3 Fatal error: Uncaught Error: Call to undefined function mime_content_type()

Fatal error: Uncaught Error: Call to undefined function mime_content_type() in when trying to upload image from admin blocks. Please check screenshot
2
votes
1answer
202 views

How to get custom local storage value in magento2?

How to get custom local storage value in magento2? I need to get the custom local storage value in php file . How to do that Thanks.
2
votes
3answers
1k views

Composer install issue in Magento 2.3?

I have one issue when I run composer install command. How to solve this issue. Thanks.
2
votes
2answers
175 views

Database connection error, after CLI install?

First time Magento user here, seeking enlightenment. I did a CLI install on CentOS 7 using the following command... ./bin/magento setup:install --base-url="http://example.com/shop/" --db-...
2
votes
1answer
1k views

How to Fix Parameter must be an array or an object that implements Countable

After upgrading to PHP 7.2 I get a lot of Warnings Parameter must be an array or an object that implements Countable I've tried many ways to fix it but none have worked so far. The commented ...
2
votes
1answer
436 views

DKIM body signing issues on Magento emails

I've got magento 2.3 running on apache with php 7.2. I've got email going out through postfix. I'm trying to get DKIM set up using opendkim. The issue i'm seeing is that emails with html formatting ...
2
votes
1answer
1k views

Magento 2.3 PHP Parse error unexpected '?' in write.php

I want to Install cron with putty SSH. I use php bin/magento cron:install [--force] and get this error: PHP Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /www/...
2
votes
1answer
374 views

Fatal error lib/Varien/Crypt/Mcrypt.php

When accessing payment methods menu in admin panel (Magento 1.9.2.2) I get the following fatal error. And in the frontend this: I asked my hosting company to instal mCrypt module on Server as shown ...
2
votes
1answer
552 views

Create attribute programmatically in magento2.3

I need to create brand attribute in fabric attribute set. <?php namespace XXX\YYY\Setup\Patch\Data; use Magento\Framework\Setup\Patch\DataPatchInterface; use Magento\Framework\Setup\Patch\...
2
votes
1answer
1k views

Uncaught TypeError: Argument 1 passed to Symfony\Component\Console\Helper\ProgressBar::setFormat() must be of the type string, null given

When i trying to install data migration tool then getting this error in SSH PHP Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Console\Helper\ProgressBar::setFormat() ...
2
votes
1answer
365 views

Magento 1.9.4.0 PHP 7.2 Cron job problems

My settings: Server OS ‪Debian 9.6‬ Plesk 17.8.11 Magento 1.9.4.0 PHP 7.2 When I run schedule task cron.sh I get this: Task "/httpdocs/cron.sh" successfully completed in 0 seconds, output: /...
2
votes
0answers
102 views

How to create a parent category dropdown in admin form in magento2.2

I want to create a drop-down field in admin UI-component form in magento2.(for getting parent category/post) How to do that How to do that Thanks
2
votes
0answers
329 views

PHP 7.2 Support Patches for Magento 1

Magento released a bunch of patches today for M1 compatibility with PHP7. This is great news as PHP7 is so much faster. Before we go ahead and apply them, I would like to know if anyone encountered ...
2
votes
1answer
459 views

New Magento1 patch for php 7.2 - how to make it work with Magento 1.13?

I am dealing with an old website with a lot of custom modules running on Magento 1.13 (obviously, EE). I am very excited to see official support for php7.2 - however, I can see that the patch is ...
1
vote
2answers
2k views

How to override view.xml file in custom module

I have change magnifier vars in view.xml file under luma theme. Its working fine . I have change it in my custom module like this ... app/code/XXX/YYY/etc/view.xml. <view xmlns:xsi="http://www....
1
vote
1answer
414 views

Magento 2.3.4 custom module - Uncaught Error: Call to a member function setData() on boolean

I've got a custom Magento 2 module that is causing issues on newly created products. All of the existing ones seem to be okay. I'm running Magento 2.3.4 in my template: /app/design/frontend/MySite/...
1
vote
2answers
726 views

Fatal error: Uncaught Error: Call to a member function select() on null.Magento2

<?php $connection = $this->getConnection(); $select = $connection->select(); $select = $model->getCollection() ->select() ->count() ->from($this->getDbPrefix() . '...
1
vote
1answer
529 views

Exception #0 (Exception): Warning: count(): Parameter must be an array or an object that implements Countable

On Magento 2.3.2 I switched from php 7.1 to php 7.2. When I did I started getting this error- Exception #0 (Exception): Warning: count(): Parameter must be an array or an object that implements ...
1
vote
2answers
2k views

How to create a dynamic fields in admin form?

I want to add add new button template in admin form like this... How to do that? Thanks.
1
vote
3answers
951 views

M1 PHP7.2 Patch - Customer Registration - “A non-numeric value encountered”

I encountered an issue with Magento 1.9.2.4 and the PHP7 Patch: If I choose optional DOB and register without DOB, the logfile shows an error: 2018-10-16T09:45:59+00:00 ERR (3): Warning: A non-...
1
vote
2answers
591 views

Magento 1 Updated with php 7.2 does not show products in beckend

I updated magento 1 to the latest version 1.9.3.10 and then set the php on the server to version 7.2, I also tested version 7.1, and find that with these versions of php the list of products in the ...
1
vote
1answer
113 views

Why phpseclib takes time in magento 2.3.3?

Recently we have upgraded Magento 2.2.8 to 2.3.3 and PHP 7.2.11, post that we are facing more performance issues. When we put site in maintenance mode phpseclib related changes keep takes time. ...
1
vote
1answer
552 views

Sorting attributes are not working Magento 2.3

I'm trying to apply sorting from the toolbar on listing page, but none of the sorting properties like price, new, name etc. are working. As you can see I have applied sort by price, but it's not ...
1
vote
1answer
157 views

Read a category attribute from title.phtml in Magento 2.3

I have found a lot of examples on how to create an extra attribute for the categories. I want to create a text field for adding a different H1 - instead of using the category name as the headings, on ...
1
vote
1answer
133 views

Add side bar in custom layout in magento2?

I want to display the subcategory and product tabs in category page .So i have customise the layout file . How to do this.. Thanks.
1
vote
1answer
1k views

How to add sidebar in custom layout in magento2?

I want to add sidebar All Product tab in custom layout in magento2? How to do that. Thanks.
1
vote
1answer
156 views

How to add new grid in product form in magento2

How to add custom grid exactly related products grid in admin product form Magento2. I want to insert custom grid under related product grid. That grid is a exact copy of related product concept.
1
vote
2answers
726 views

Get product attribute measurement in magento2

How to get the width of Product UoM in magento2 Ex: Weight : 100 cm Thanks.
1
vote
1answer
520 views

Custom tab in admin product page in magento2

I have created custom tab and added template for this tab using this link. app/code/Namespace/Modulename/view/adminhtml/ui_component/product_form.xml <form xmlns:xsi="http://www.w3.org/...
1
vote
1answer
1k views

Why does Magento 1.9.3.10 does not include /lib/mcrypt_compat/mcrypt.php

Magento released a patch for magento 1.9.3.x to be able to support php7.2. The patch includes /lib/mcrypt_compat/mcrypt.php so that php7.2 which does not have the mcrypt module (at least officially), ...
1
vote
1answer
310 views

Attachement Upload (Uncaught SyntaxError: Unexpected token < in JSON at position 0)

If I want to insert a file, into the product, I get the following error message in the console. Uncaught SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) ...
1
vote
1answer
32 views

Magento2 - Maintenance page

I want to show the custom page while running the Magento commands like (upgrade, di: compile, deploy). How to do that. Thanks.
1
vote
0answers
152 views

Magento 2.3.4 magento blank and luma theme less compilation error

After updating to Magento 2.3.4 from 2.2.6 on my staging server with nginx server and php7.2 I am facing issue in compiling less and css files. The files styles-l.css and styles-m.css are missing - ...
1
vote
1answer
46 views

Fatal error: Uncaught Error: Call to undefined method Training\Reviews\Model\ResourceModel\Reviews\Collection::addAttributeToFilter()

I want SELECT COUNT (*) FROM name_table WHERE result LIKE 'likes%' to be executed, and a numeric value is displayed on the page.How do I do it? I'm a beginner. I'll be very grateful for your help! /...