0

config: php 7.0.22

mamp 4.2

Magento-2.2.2 without sample data

localhost running.

Hello! Currently I'm trying to learn how to develop a custom theme for magento, i followed the following steps : http://devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/theme-create.html

My theme folder structure:

magento/app/design/frontend/Guilherme/guitheme/ ---> root dir

guitheme/composer.json

{
 "name": "Guilherme/guitheme",
 "description": "guitheme",
 "require": {
   "php": "~5.5.0|~5.6.0|~7.0.0",
   "magento/theme-frontend-blank": "100.0.*",
   "magento/framework": "100.0.*"
 },
 "type": "magento2-theme",
 "version": "1.0.0",
 "license": ["OSL-3.0","AFL-3.0" ],
 "autoload": {
   "files": [
     "registration.php"]} }

guitheme/etc/view.xml

<image id="category_page_grid" type="small_image"><width>240</width<height>300</height></image>

guitheme/registration.php

<?php
   \Magento\Framework\Component\ComponentRegistrar::register(
   \Magento\Framework\Component\ComponentRegistrar::THEME,
   'frontend/Guilherme/guitheme',
   __DIR__
   );
   ?>

guitheme/theme.xml

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
        <title>guitheme</title>
        <parent>Magento/blank</parent>
        <media>
            <preview_image>media/logoimage.jpg</preview_image>
        </media>
</theme>

after that, i run the CLI command: setup:upgrade and i receive the following error:

Warning: DOMDocument::loadXML(): Specification mandate value for attribute n in Entity, line: 3 in /Applications/MAMP/htdocs/magento/vendor/magento/framework/Config/Theme.php on line 75

and i cant acess my localhost/magento/admin page anymore, but if i remove my created theme i can.

someone have any ideia? Thanks!

0

You can follow the process described - https://rishabhrkrai.wordpress.com/2018/01/02/magento-2-create-customchild-theme/

  • i receive the same error in the CLI described before after i do all of the steps. – G. Mazzei Jan 23 '18 at 12:08
  • Which command you run on CLI? – Rishabh Rk Rai Jan 23 '18 at 12:32
  • cache:clean after that setup:static-content:deploy – G. Mazzei Jan 23 '18 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.