I'm trying to create a new template in Magento 2 but when including the registration.php file, it throws the error "Parse error: syntax error, unexpected ':' in C:\xampp\htdocs\app\design\frontend\compname\newtheme\registration.php on line 17"
The code in the file is:
Can anyone please advise?
Solved! Go to Solution.
Your code should be:
\Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::THEME, 'frontend/compname/newtheme', __DIR__ );
The C:\xampp\htdocs... part is wrong on your example.
Many thanks for your answer. I did the suggested changes and also executed the command "php bin/magento setup:static-content:deploy". However I'm still getting the following error when trying to load the Admin Dashboard.
There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: 13859653