[Fixed] Gedmo Sluggable generates incorrect YML field format

0 votes
asked Jun 29, 2016 in Solved by adamwood (140 points)
recategorized Jul 6, 2016 by ludek.vodicka

Hi,

While this issue has apparently been resolved for annotation exports, it appears to have the same problem on YML exports.

Expected output:

slug:
  type: string
  gedmo:
    slug:
      unique: true
      fields:
        - title

Actual output:

slug:
  type: string
  gedmo:
    slug:
      unique: true
      fields:
        title:

Skipper 3.2.7.1321

Thanks

commented Jun 29, 2016 by ludek.vodicka Skipper developer (140,450 points)

thanks for info. We will check it

commented Jun 29, 2016 by adamwood (140 points)

Thanks for your quick response.

I've just noticed that a similar issue also exists on the Tree extension. On at least the treeLeft, treeRight, treeLevel and treeParent mappings it outputs like this:

gedmo:
  treeLevel:

... instead of this:

gedmo:
  - treeLevel

https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/tree.md#yaml-mapping-example

commented Jun 29, 2016 by ludek.vodicka Skipper developer (140,450 points)

Interesting. I have to discuss this with my colleague who work on implementation. But what I would like to ask, are you sure that this syntax doesn't work too?

commented Jun 29, 2016 by adamwood (140 points)

Yes, I only found this due to Gedmo throwing an exception:

[Gedmo\Exception\InvalidMappingException] Missing properties:
ancestor, left, right in class

Changing the four properties above to the second format resolved the issue.

commented Jun 29, 2016 by ludek.vodicka Skipper developer (140,450 points)

Thanks for info. In this case it's a definitely bug ;-)

1 Answer

0 votes
answered Jul 6, 2016 by ludek.vodicka Skipper developer (140,450 points)

Hi,
this issue is now fixed in latest beta. Please test it and let me know if everything works for you as expected.

http://support.skipper18.com/402/downloads-skipper-beta

commented Jul 8, 2016 by adamwood (140 points)

Thanks, the latest beta has resolved the issue with sluggable arrays.

However, the issue is still present on the Tree extension properties, as Skipper is still outputting as per my earlier comment.

commented Jul 8, 2016 by ludek.vodicka Skipper developer (140,450 points)

Thanks for testing. We tested/fixed only Sluggable extension. I will forward tree extensions info to my colleague too.

commented Oct 5, 2016 by ludek.vodicka Skipper developer (140,450 points)

Gedmo YML issue should be completely fixed in latest beta 3.2.7.1334 https://support.skipper18.com/402/downloads-skipper-beta

...