Hello, i get :
error on line 4 at column 6: StartTag: invalid element name

In my view preview, i get :

<?xml version="1.0" encoding="UTF-8" ?>
<nodes>
  <node>
    <>Prochainement tombola: un GPS à gagner ainsi que des bons d&#039;achat SNCF (d&#039;une valeur de 15€ et 30€)</>
  </node>
  <node>
    <>Tu recherches une musique diffusée sur GB? Envoi nous la date et l&#039;heure de sa diffusion GB te renverra le nom! (gbradio@hei.fr)</>
  </node>
  <node>
    <>Plus besoin de t&#039;embeter à chercher des nouveaux sons tout frais! GB t&#039;en propose dans l&#039;onglet Playlist actualisé chaque semaine!</>
  </node>
</nodes>

How can i fix it ?

Comments

dyesdyes’s picture

Up

steven jones’s picture

Status: Active » Postponed (maintainer needs more info)

What is the field name for the field that results in an empty XML tag?

BenK’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Status: Postponed (maintainer needs more info) » Active

I'm experiencing this same issue in the latest 7.x-3.x-dev release. I only have one field in my view... the standard "Content: Title" field (node title). Any ideas as to what could be causing the problem?

Thanks,
Ben

BenK’s picture

It seems that the problem may result from not having a label specified on the "Content: Title" field.

Unfortunately, it appears that the label is unchecked by default in Views for the "Content: Title" field. So you have to remember to add it.

-Ben

steven jones’s picture

Component: Documentation » Code

Ah lovely, maybe we should provide some sensible fallback for an empty tag, as there's no good reason to have one.

steven jones’s picture

Title: error on line 4 at column 6: StartTag: invalid element name » Provide a fallback for empty labels
rond49’s picture

Apparently, you get this error also if the label of a field is a string in a different alphabet, e.g., Hebrew characters. They get eliminated when the XML (in my case) is generated, resulting in an empty tag.

steven jones’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
Status: Active » Patch (to be ported)

Ah, we were trying to fix this, but were failing, pushed a fix to 7.x-3.x.

steven jones’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Patch (to be ported) » Needs work
Issue tags: +Needs tests

We should add some tests for this.

steven jones’s picture

Status: Needs work » Fixed

Actually turns out that we didn't correctly sanitise the tag names, and allowed empty tags. Added a test to support this.

steven jones’s picture

Version: 7.x-3.x-dev » 6.x-2.x-dev
Status: Fixed » Patch (to be ported)

We should backport this fix to 6.x-2.x.

steven jones’s picture

Status: Patch (to be ported) » Fixed

Sweet, pushed to 6.x-2.x here and here. Thanks!

Status: Fixed » Closed (fixed)
Issue tags: -Needs tests

Automatically closed -- issue fixed for 2 weeks with no activity.