As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [xml]

Denotes questions about XML files and XML processing.

Filter by
Sorted by
Tagged with
0 votes
3 answers
2k views

Show/Hide Editor Not Responding

I have tried to look for previous solution and couldn't find any relevant topics. So I guess I should post a new question here. We are trying to toggle the WYSIWYG editor (Which is turned by default) ...
4 votes
2 answers
6k views

Magento 2.2.2 - Display Customer Account header dropdown and remove Sign Out link post login

After successful login, Luma theme shows customer account details in dropdown on header as seen in below image I need to replicate the same in our custom theme which has Blank as its parent. Vendor/...
0 votes
2 answers
28 views

DOMDocument::loadXML(): Argument #1 ($source) must not be empty in DomMerger.php

Keep getting this error in exception, no solutions to find on the internet: DOMDocument::loadXML(): Argument #1 ($source) must not be empty in /vendor/magento/framework/View/Element/UiComponent/Config/...
3 votes
2 answers
5k views

Magento 2: How to show New Products in a particular Category?

I have a category named NEW and I want to show all new products in this category (filter by Set Product as New From To attribute), how can I do that? Thank you.
0 votes
2 answers
48 views

Custom Header Link Layout Update

I have added the below code to app/design/frontend/Company/Theme/Magento_Theme/layout/default.xml but the link is not appearing in the header. Can someone please tell me what I am missing? <...
0 votes
1 answer
29 views

Prevent XML file in media directory to be cached

We are generating a custom XML and stored in the media directory to be accessed by URL. La full URL of the XML have this structure: https://[maindomain.com]/media/googleshopping/googleshopping4-1.xml ...
1 vote
2 answers
1k views

Add block in layout XML only for one store view

I have a Magento 2.1.x installation with two store views. I would like to show a particular block in the footer only for one store view. In Magento 1.9.x I would have done it in this way: <...
4 votes
1 answer
1k views

XML - Cannot move product.info.review after product.info.overview

I'm trying to do the following, moving product.info.review after product.info.overview (short description) I've used the following code, but it is not working: <move element="product.info.review"...
3 votes
2 answers
2k views

Magento Container not working in custom layout

I have created a custom XML layout page that I will be using for my home page. Right now it is a clone of the normal 1column.xml layout, and I'm trying to add a container for an image slider. Here is ...
13 votes
3 answers
15k views

Magento2: Default to sort by price descending not ascending

Ok so I have my categories sorting by price. Magento 2 defaults this to price ascending. But I would prefer it to be by price descending. Pretty sure I can do this by customising ...
4 votes
4 answers
2k views

How to call module block after header?

I have a module layout file below <default> <block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" ...
0 votes
0 answers
12 views

Magento 2 + Website Specific layout XML file in theme

I am using the same theme for 2 websites, There are some blocks that need to remove from one website. so is there any way we can add a layout XML file for the website so we can remove that block via ...
0 votes
2 answers
1k views

How to change image background color in Magento 2 via XML?

I want to change the white background color to any other color in Magento 2. How could I do it?
1 vote
2 answers
2k views

Any change to default.xml breaks homepage layout

Fairly new to Magento 2. Working from a cloned version of another site and trying to make simple, cosmetic changes to the custom theme homepage here: app/design/frontend/Vendor/Theme/Magento_Theme/...
1 vote
1 answer
1k views

Magento doesn't support camelCase in URL/route?

If you are declaring your router in etc/adminhtml/routes.xml with similar way <?xml version="1.0" encoding="UTF-8"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
4 votes
1 answer
2k views

Magento 2 Blank Layout Page

I tried to create a new tab in customer edit backend. First i create the app/code/Namespace/Point/view/adminhtml/layout/customer_index_edit.xml <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
5 votes
3 answers
2k views

Facing issue when running the command php bin/magento setup:upgrade

Facing issue when running the command php bin/magento setup:upgrade The XML in file "D:/wamp64/www/porto/vendor/magento/module-inventory-catalog/etc/communication.xml" is invalid: Element 'topic', ...
0 votes
2 answers
1k views

Layout Update XML for Category in Magento 2.3.4

Can anyone help me how to change number of products per page for a SPECIFIC category. I am on magento 2.3.4 and noticed that Layout Update XML does not exist anymore.
1 vote
1 answer
2k views

Magento 2.2.2 - Move custom navigation into header-wrapper in XML and make it responsive

Below xml adds custom navigation before category. To make it responsive I have included it under block navigation.sections. <referenceBlock name="navigation.sections"> <...
0 votes
3 answers
2k views

I have create system.xml for system config value but not work

I have created one extension now i released i have also need some system config value where user can easily to handle this module. so i have created system.xml in adminhtml folder but its not work ...
1 vote
1 answer
1k views

Magento’s XMLConnect basics guidelines please

I have investigated and found that it's possible to make android application via magento's XMLConnect extention. And as inchoo said that it is coming pre-installed in magento since CE1.5 and later. ...
0 votes
2 answers
1k views

How to add view model to existing phtml and block

Is there any possibility to add ViewModel to the existing block and PHTMl file? I'm trying to add ViewModel to the file below. sales_email_order_renderers Code: <?xml version="1.0"?> &...
1 vote
2 answers
1k views

How to override or extend etc/view.xml file in custom module in Magento2?

I would like to override or extend some of gallery setting(view.xml) and catalog image size changes with my custom module. I have tried to override in app/code/<vendor>/<module>/etc/view....
0 votes
3 answers
1k views

Magento 2 how to show custom block before product.info.details and after media

Magento 2.3.5-p2 how to show custom block before product.info.details and after media ? <div class="product-info-main"></div> <div class="product media"></div&...
0 votes
1 answer
1k views

How to make checkout page 2columns-left on magento 2

I try to make the checkout page 2columns-leftlayout, but i can't. If i add this code in checkout_index_index.xml <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-...
0 votes
1 answer
2k views

Magento 2: Warning: simplexml_load_string(): Entity: line 1: parser error : XML declaration allowed only at the start of the document

I am using Magento 2.0 I have learned magento2 tutorials(No frills magento2 layout) of alan storm. I have created two XML files. when I run the controller file then give the following error Warning: ...
1 vote
2 answers
1k views

Set default value on select of page layout in cms_page_form.xml

I would like to set a default value for the select on the page layout when creating a new cms page in Magento 2. The file I'd like to make an extension for is cms_page_form.xml under module-cms > ...
0 votes
1 answer
1k views

Some of product detail page error- Element 'reference': This element is not expected

When I tried to change or open product I got next message: 1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'reference': This element is not expected. Line: 1 ...
2 votes
1 answer
1k views

Magento 2 - Move Block Not Working

I've created a faqs.xml for a bespoke page template and this is my code: <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/...
1 vote
3 answers
4k views

How to set a specific category page as homepage in Magento 2

I tried to set as a homepage a specific category page but only for a storeview, but I am not sure how to do this. I have 2 store views and for one of these, I want to set particular category page as ...
0 votes
2 answers
5k views

Add js in head in magento 1.9

All js script are loaded in footer in magento 1.9. I want them in head. Can Anyone let how to do this ?
0 votes
2 answers
37 views

How to double extend Magento_Checkout/js/view/summary/item/details in Magento 2

is it possible to extend a new checkout_index_index.xml on top of already existing one I created a projectA/app/design/frontend/MageBig/martfury/projecta/Magento_Checkout/layout/checkout_index_index....
0 votes
1 answer
1k views

Product Page Layout

I'm trying to find a way to add a new custom layout for some products so I can just go to the Design Tab and choose the "Page Layout" from the dropout. I can only find CMS Layout pages in google. Also ...
0 votes
0 answers
215 views

Magento 2 - Add custom form to admin sales order create

I'm trying to add a form to the admin sales order create page. When I create a new order i cannot see my form but if i refresh the page the form is available. i added code to sales_order_create_index....
0 votes
1 answer
1k views

Magento 2: Change UI template

For the checkout, I would like to use a different UI template to that which is used on the cart. Currently, they both use the same UI template: <item name="template" xsi:type="string">ui/form/...
5 votes
1 answer
1k views

Magento 2 - assign custom email template to specific payment method

What is the proper way to assign custom email template to specific payment method upon creating an order? For example: When choosing a Bank transfer payment method on the checkout it should send ...
2 votes
1 answer
2k views

Magento2 : How to add <item> in XML <block> <arguments>

I would like to update the following layout .xml : <?xml version="1.0"?> <!-- /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <...
1 vote
2 answers
1k views

Magento 2 | Add NOINDEX, FOLLOW to 404 CMS page using XML

How do I add NOINDEX, FOLLOW robots META tag to a custom 404 CMS page in Magento using XML, no matter what URL the page is served at? By following the answer on this page, I was able to figure out ...
1 vote
2 answers
3k views

Xml Element reference is not allowed here

I am new to Magento & I am using Magento version 2.1.7 in my Windows 8.1 system with Xampp while creating a new module I am getting an error in my XML file located in the app/code/vendor/module/...
5 votes
4 answers
5k views

Magento 2 - Backend custom module 404 error

I'm trying to create my custom module in the back-end, I followed a lot of tutorials, but I continue to get 404 error when I try to access to my controller. The only thing that work fine is the menu ...
9 votes
1 answer
1k views

Magento 2 - Move the afterMethods item (Discount and Gift Card Code) to the Order Summary sidebar

I would like to move the afterMethods xml item which contains the Discount Code and Gift Card code under the billing-step in the module-checkout/view/frontend/web/checkout_index_index.xml so that it ...
2 votes
2 answers
2k views

Magento 2. Change column sort order

Columns in magento 2 has item sort order: <item name="sortOrder" xsi:type="number">44</item> But it doesn't change the column order. What need I to do to change columns order?
0 votes
1 answer
143 views

How to add data to custom validation rule?

I would like to understand how to add additional data to custom validation rule. I noticed in Magento 2 core files something like the following: validator.addRule( 'validate-...
0 votes
0 answers
33 views

How to reorder the mobile menu tablist in Magento 2.4.3 default.xml

I am looking for the simplest way to reorder the mobile menu tabs in my custom theme inheriting luma on Magento Open Source 2.4.3. Both tabs are showing fine but I can not use before 'store.links' or ...
6 votes
2 answers
3k views

Magento2: How to add separate css file on each cms page?

Is it possible to add individual CSS file on each cms page? Upon researching, I can do it by adding code on Layout update XML. Unfortunately, it isn't working. Here's my code: <head> <...
0 votes
2 answers
55 views

Magento 2: Add block to cms page with / in the url key trough xml

Magento 2: I'm trying to add a block to a cms page with a layout overwrite. The problem is the url key has a / at the end which can not be removed. So the url key is uber-uns/ If i remove the / as a ...
0 votes
1 answer
1k views

How add text in custom theme header magento 2

<referenceContainer name="header.wrapper"> <block class="Magento\Theme\Block\Html\Header" name="header.links" after="logo"> <arguments> <...
34 votes
8 answers
35k views

Admin config error: Undefined index: id in Iterator.php on line 59

Can someone please explain this error to me? Exception #0 (Exception): Notice: Undefined index: id in /home/staging/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 59 ...
0 votes
2 answers
39 views

routes.xml complains about empty tag, which is obviously not empty

I have python background so its really hard for me to get my hands on magento2, since I've never touched php/xml/js etc. before. Currently I just want to add a button in admin backend, which leads to ...
0 votes
1 answer
39 views

What is the file I have to debug to know how Magento load all file di.xml from all core module and custom module?

I understand that Magento will read all di.xml files and the output will be an array. I want to know where this code is so I can debug and dig deeper into it. Any help? Thanks.

1
2 3 4 5
24