ERRORS - letronghieu4897/magento GitHub Wiki
1. 2 Type of Construct param is Required and Optional.
2. Error when we add new custom param in extend class.
3. If we put custom param above Optional type => Option type will be become Required => Cause errors.
4. Fix it by the way put Optional params in the lastest constructor.
public function __construct(
\Magento\Quote\Model\Cart\CurrencyFactory $currencyFactory, // required
JoinProcessorInterface $extensionAttributesJoinProcessor, // required
\Magento\Framework\Model\Resource\AbstractResource $resource = null, //optional
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, //optional
array $data = [] //optional
)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public function __construct(
\Magento\Quote\Model\Cart\CurrencyFactory $currencyFactory, // required
JoinProcessorInterface $extensionAttributesJoinProcessor, // required
\Magento\Framework\Model\Resource\AbstractResource $resource = null, // required (even though it has a default value, because it is followed by parameters that don't have default values)
int $x, // required
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, // optional (still optional because there are no required parameters following it)
array $data = [] // optional
)
1. Check files fail <Show on log>
2. Comment code fail in file patch <file.sh>
Theme > Performance > disable > merge css | merge js
1. Clear cache Magento
2. Disable amasty
1. vim /etc/my.cnf
- - - - - - - - - - - - - - - - - - - - - - - -
max_allowed_packet=524288000
wait_timeout = 100
log-error=/var/log/mysql/mysql_error.log
- - - - - - - - - - - - - - - - - - - - - - - -
2. service mysqld restart
NOTE : USING PORTO THEME
admin _______________________________________________________________________
├── PORTO
| ├── Installation
│ │ ├── Import static blocks
| | ├── Import CMS Page
│ │ └── Choose New demos
| |
| └── Design Panel
| └── Save Config
├── STORE
| └── Config > General > Web > Choose Porto Demo.
._________________________________________________________________________
[1]. Install nvm
[2]. Install multiple node version. Choose version node v8.3.0
[3]. Copy file package.json from lenspower. (File below)
[4]. npm run gulp
{
"name": "magento2",
"author": "Magento Commerce Inc.",
"description": "Magento2 node modules dependencies for local development",
"license": "(OSL-3.0 OR AFL-3.0)",
"repository": {
"type": "git",
"url": "https://github.com/magento/magento2.git"
},
"homepage": "http://magento.com/",
"devDependencies": {
"glob": "~7.1.1",
"grunt": "~1.0.1",
"grunt-autoprefixer": "~3.0.4",
"grunt-banner": "~0.6.0",
"grunt-continue": "~0.1.0",
"grunt-contrib-clean": "~1.1.0",
"grunt-contrib-connect": "~1.0.2",
"grunt-contrib-cssmin": "~2.2.1",
"grunt-contrib-imagemin": "~2.0.1",
"grunt-contrib-jasmine": "~1.1.0",
"grunt-contrib-less": "~1.4.1",
"grunt-contrib-watch": "^1.1.0",
"grunt-eslint": "~20.1.0",
"grunt-exec": "~3.0.0",
"grunt-jscs": "~3.0.1",
"grunt-replace": "~1.0.1",
"grunt-styledocco": "~0.3.0",
"grunt-template-jasmine-requirejs": "~0.2.3",
"grunt-text-replace": "~0.4.0",
"gulp": "^3.9.1",
"gulp-livereload": "^3.8.1",
"gulp-notify": "^3.0.0",
"gulp-plumber": "^1.1.0",
"gulp-sass": "^3.1.0",
"imagemin-svgo": "~5.2.1",
"load-grunt-config": "~0.19.2",
"morgan": "~1.9.0",
"node-minify": "~2.3.1",
"path": "~0.12.7",
"serve-static": "~1.13.1",
"squirejs": "~0.2.1",
"strip-json-comments": "~2.0.1",
"time-grunt": "~1.4.0",
"underscore": "~1.8.0"
},
"scripts": {
"gulp": "gulp"
},
"dependencies": {
"gulp-install": "^1.1.0"
}
}
nginx.conf
fastcgi_split_path_info ^(/update/index.php)(/.+)$;
Or
fastcgi_split_path_info ^(.+?\.php)(/.*)$;