Get a more debugable error message when DOM validation fails in Magento.
Original Error Message
1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'arguments': This element is not expected.
Line: 1471
<?php | |
namespace PHP_CodeSniffer\Standards\Mdoq\Sniffs\Functions; | |
use PHP_CodeSniffer\Sniffs\Sniff; | |
use PHP_CodeSniffer\Files\File; | |
class DisallowPrintRSniff implements Sniff | |
{ | |
public const METHOD_NAME = 'print_r'; |
Get a more debugable error message when DOM validation fails in Magento.
Original Error Message
1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'arguments': This element is not expected.
Line: 1471
select job_code, | |
avg(timestampdiff(second, executed_at, finished_at)) as average_run_time, | |
min(timestampdiff(second, executed_at, finished_at)) as min_run_time, | |
max(timestampdiff(second, executed_at, finished_at)) as max_run_time | |
from cron_schedule where executed_at is not null and finished_at is not null group by job_code order by max(timestampdiff(second, executed_at, finished_at)) desc; |
<?php | |
use Magento\Setup\Module\I18n\Parser\Parser; | |
if(!is_file('bin/magento')){ | |
echo 'Unable to find "bin/magento", this needs to be ran from the root of the project.'.PHP_EOL; | |
return 1; | |
} | |
define('REPORT_WIDTH', 200); |
Sometimes when running composer install
for Magento 2 depending on your current directory structure the Magento composer plugin does not extract/copy the files out of vendor.
Which leaves you with a broken installation.
curl -s https://gist.githubusercontent.com/adamzero1/0eb6d3e14078676a3ba589d77ba67b3d/raw/6ed67290b6eca7211942d1363ab6115eefd590a6/fix | bash
select ea.attribute_code, | |
ea.frontend_label, | |
oc.option_id, | |
oc.attribute_id, | |
oc.option_code, | |
eaov.value_id, | |
eaov.store_id, | |
eaov.value from option_code as oc | |
left join eav_attribute_option_value as eaov on oc.option_id = eaov.option_id | |
left join eav_attribute as ea on oc.attribute_id = ea.attribute_id |
<?php | |
require realpath(__DIR__) . '/app/bootstrap.php'; | |
class RedisCustom extends Credis_Client { | |
private static function _prepare_command($args) | |
{ | |
return sprintf('*%d%s%s%s', count($args), CRLF, implode(array_map(array('self', '_map'), $args), CRLF), CRLF); | |
} |
--- Model/Export/Product.php 2021-03-16 13:35:33.809000000 +0000 | |
+++ Model/Export/Product.php 2021-03-16 13:36:09.819832268 +0000 | |
@@ -949,8 +949,9 @@ | |
$productIds = array_keys($rawData); | |
$stockItemRows = $this->prepareCatalogInventory($productIds); | |
+ $entityCollection = clone $this->_getEntityCollection(); | |
$this->rowCustomizer->prepareData( | |
- $this->_prepareEntityCollection($this->_entityCollectionFactory->create()), | |
+ $entityCollection, |
store
,website
(string)2.* CE
, 2.* EE
The scope the current request should be running as2.* CE
, 2.* EE
Website/Store (depending on MAGE_RUN_TYPE
) code for the current request
You can use admin
for admin.