Magento2中的og:image标记cms_index_index.xml(开发人员模式)

时间:2019-04-25 19:24:10

标签: magento magento2

当我尝试添加时:

Data is missing date 2019-02-21 00:00:00 from ['01/01/2019' '01/02/2019' '01/03/2019' '01/04/2019' '01/05/2019'
 '01/07/2019' '01/08/2019' '01/09/2019' '01/10/2019' '01/11/2019'
 '01/12/2019' '01/14/2019' '01/15/2019' '01/16/2019' '01/17/2019'
 '01/18/2019' '01/19/2019' '01/21/2019' '01/22/2019' '01/23/2019'
 '01/24/2019' '01/25/2019' '01/26/2019' '01/28/2019' '01/29/2019'
 '01/30/2019' '01/31/2019' '02/01/2019' '02/02/2019' '02/04/2019'
 '02/05/2019' '02/06/2019' '02/07/2019' '02/08/2019' '02/09/2019'
 '02/11/2019' '02/12/2019' '02/13/2019' '02/14/2019' '02/15/2019'
 '02/16/2019' '02/19/2019' '02/20/2019' '02/21/2019' '02/22/2019'
 '02/23/2019' '02/25/2019' '02/26/2019' '02/27/2019' '02/28/2019'
 '03/01/2019' '03/02/2019' '03/03/2019' '03/04/2019' '03/05/2019'
 '03/06/2019' '03/07/2019' '03/08/2019' '03/09/2019' '03/11/2019'
 '03/12/2019' '03/13/2019' '03/14/2019' '03/15/2019' '03/16/2019'
 '03/18/2019' '03/19/2019' '03/20/2019' '03/21/2019' '03/22/2019'
 '03/23/2019' '03/25/2019' '03/26/2019' '03/27/2019' '03/28/2019'
 '03/29/2019' '03/30/2019' '04/01/2019' '04/02/2019' '04/03/2019'
 '04/04/2019' '04/05/2019' '04/06/2019' '04/08/2019' '04/09/2019'
 '04/10/2019' '05/29/2018' '05/30/2018' '05/31/2018' '06/01/2018'
 '06/02/2018' '06/04/2018' '06/05/2018' '06/06/2018' '06/07/2018'
 '06/08/2018' '06/09/2018' '06/11/2018' '06/12/2018' '06/13/2018'
 '06/14/2018' '06/15/2018' '06/16/2018' '06/18/2018' '06/19/2018'
 '06/20/2018' '06/21/2018' '06/22/2018' '06/23/2018' '06/25/2018'
 '06/26/2018' '06/27/2018' '06/28/2018' '06/29/2018' '06/30/2018'
 '07/03/2018' '07/04/2018' '07/05/2018' '07/06/2018' '07/07/2018'
 '07/09/2018' '07/10/2018' '07/11/2018' '07/12/2018' '07/13/2018'
 '07/14/2018' '07/16/2018' '07/17/2018' '07/18/2018' '07/19/2018'
 '07/20/2018' '07/21/2018' '07/23/2018' '07/24/2018' '07/25/2018'
 '07/26/2018' '07/27/2018' '07/28/2018' '07/30/2018' '07/31/2018'
 '08/01/2018' '08/02/2018' '08/03/2018' '08/04/2018' '08/07/2018'
 '08/08/2018' '08/09/2018' '08/10/2018' '08/11/2018' '08/13/2018'
 '08/14/2018' '08/15/2018' '08/16/2018' '08/17/2018' '08/18/2018'
 '08/20/2018' '08/21/2018' '08/22/2018' '08/23/2018' '08/24/2018'
 '08/25/2018' '08/27/2018' '08/28/2018' '08/29/2018' '08/30/2018'
 '08/31/2018' '09/01/2018' '09/04/2018' '09/05/2018' '09/06/2018'
 '09/07/2018' '09/08/2018' '09/10/2018' '09/11/2018' '09/12/2018'
 '09/13/2018' '09/14/2018' '09/15/2018' '09/17/2018' '09/18/2018'
 '09/19/2018' '09/20/2018' '09/21/2018' '09/22/2018' '09/24/2018'
 '09/25/2018' '09/26/2018' '09/27/2018' '09/28/2018' '09/29/2018'
 '10/01/2018' '10/02/2018' '10/03/2018' '10/04/2018' '10/05/2018'
 '10/06/2018' '10/09/2018' '10/10/2018' '10/11/2018' '10/12/2018'
 '10/13/2018' '10/15/2018' '10/16/2018' '10/17/2018' '10/18/2018'
 '10/19/2018' '10/20/2018' '10/22/2018' '10/23/2018' '10/24/2018'
 '10/25/2018' '10/26/2018' '10/29/2018' '10/30/2018' '10/31/2018'
 '11/01/2018' '11/02/2018' '11/03/2018' '11/05/2018' '11/06/2018'
 '11/07/2018' '11/08/2018' '11/09/2018' '11/10/2018' '11/13/2018'
 '11/14/2018' '11/15/2018' '11/16/2018' '11/18/2018' '11/19/2018'
 '11/20/2018' '11/21/2018' '11/22/2018' '11/23/2018' '11/24/2018'
 '11/26/2018' '11/27/2018' '11/28/2018' '11/29/2018' '11/30/2018'
 '12/01/2018' '12/03/2018' '12/04/2018' '12/05/2018' '12/06/2018'
 '12/07/2018' '12/08/2018' '12/09/2018' '12/10/2018' '12/11/2018'
 '12/12/2018' '12/13/2018' '12/14/2018' '12/15/2018' '12/17/2018'
 '12/18/2018' '12/19/2018' '12/20/2018' '12/21/2018' '12/22/2018'
 '12/24/2018' '12/25/2018' '12/27/2018' '12/28/2018' '12/29/2018'
 '12/31/2018']

在xml文件“ cms_index_index.xml”中,出现错误:

  

1个例外:       异常#0(Magento \ Framework \ Config \ Dom \ ValidationException):元素“元”,属性“属性”:不允许属性“属性”。       线:743

我希望meta标签位于head标签内。

1 个答案:

答案 0 :(得分:0)

因此答案是该属性无效,只需使用“名称”属性...

<head>
    <meta property="og:image" content="http://example.com/DEFAULTIMAGE.png" />
</head>

标签现在显示:)