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
services: | |
app: | |
ports: !reset [] | |
labels: | |
- "traefik.enable=true" | |
- "traefik.http.routers.magento-loc.tls=true" | |
- "traefik.http.routers.magento-loc.rule=Host(`magento.loc`)" | |
- "traefik.http.services.magento-loc.loadbalancer.server.port=8443" | |
- "traefik.http.services.magento-loc.loadbalancer.server.scheme=https" | |
networks: |
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
/** | |
* Run in the console to inline all code block styles before | |
* copy + pasting into ConvertKit in HTML mode | |
*/ | |
const CSS_PROPERTIES = [ | |
'background-color', | |
'font-size', | |
'color', | |
]; |
<?php | |
declare(strict_types=1); | |
namespace MyNamespace\Sales\Model\Order\Pdf; | |
use Magento\Sales\Model\Order\Pdf\AbstractPdf as MagentoAbstractPdf; | |
/** | |
* Drastically reduce size of PDF by changing fonts |
<style> | |
.git-graph { | |
text-align: left; | |
line-height: 1; | |
} | |
.git-graph-row { | |
clear: both; | |
text-align: left; | |
} | |
.git-graph-cell { |
Magento 2.3.7 and 2.4.2 ship with composer v2 support out of the box but as far as I can see the only thing that needs to happen is to use some more modern versions of certain composer plugins which are used by certain dependencies of Magento.
This means we should be able to add composer v2 support to older Magento2 versions as well if we get a bit creative.
See below for diffs of the composer.json
files you can apply to your projects, be sure to keep a mental note of these things, they will need to maintained by yourself in case newer versions of these modules are released. And if one day you update to Magento 2.3.7 or 2.4.2 or higher, you can remove these changes again.
// Modified from @mutsuda's https://medium.com/@mutsuda/create-an-ios-widget-showing-google-spreadsheets-data-856767a9447e | |
// by @levelsio | |
// HOW TO | |
// 1) Make a Google Sheet, we'll pull the first cell e.g. A1 | |
// 2) Publish your Google Sheet, File -> Publish To Web | |
// 3) Copy the SHEET_ID in the URL, put it in here below: | |
const endpoint = "https://spreadsheets.google.com/feeds/cells/SHEET_ID/1/public/full?alt=json" | |
// 4) Install Scriptable @ https://apps.apple.com/us/app/scriptable/id1405459188 | |
// 5) Copy this entire script in to Scriptable (tip: you can send it to your iPhone via Whatsapp/Messenger/Telegram etc) |
#!/bin/bash | |
MAGE_BASE_URL="$1" | |
MAGE_SKU="$2" | |
PAYMENT_KEY="$3" | |
PAYMENT_METHOD="$4" | |
STORE_VIEW="$5" | |
CREDIT_CARD="$6" | |
CREDIT_CARD_CVC="$7" |
# use ImageMagick convert | |
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf | |
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf |
# Before using these aliases and function you must make a backup of your xdebug.ini | |
# (in this case /etc/php/conf.d/xdebug.ini.back) | |
# You will also need to be able to edit xdebug.ini | |
alias xdebug-disable='echo "" > /etc/php/conf.d/xdebug.ini' | |
alias xdebug-restore='cat /etc/php/conf.d/xdebug.ini.back > /etc/php/conf.d/xdebug.ini' | |
phpu() { | |
xdebug-disable | |
phpunit "$@" |