Remove parent check from xar:verify

Hi everyone,

currently, when exporting a XAR file from an XWiki instance and running xar:format and then xar:verify on it, xar:verify complains about the missing parent property. It is usually worked around by adding <parent>WebHome</parent> to the XAR file.

Now that the parent field is not really used anymore in XWiki, we should probably remove the check for its present in xar:verify and stop mandating its presence.

I therefore propose to vote and remove this old check from our code.

+1

-1 from me for now as I believe we first need to decide to stop supporting parents. Right now we’ve kept backward compatibility and the ability to put back that feature through a config option. This is why we mandate that all our pages set the parent.

Then, I believe xar:format should automatically fix the missing parent in the meantime. I can open a new proposal for this.

Setting the parent automatically is not always easy. I don’t understand the problem. It’s quite easy for a human to decide what the parent is and you do this once, it’s not very time-consuming.

PS: I’m not against dropping backward compat for the parent feature, we just need to decide it and we need a thread for it.

The point is to reduce friction when developing for XWiki. Now, maybe the issue is that XWiki exports without setting the parent property. Exporting + xar:format should produce a valid XAR file that passes the checks IMO. I don’t think developers should have to think about the parent property if it’s not really used anymore. It gets in the way and is quite irrelevant to the task the developer is probably handling.

I understand that you are not against deprecating the parent feature, but this seems more ambitious and broader than my initial proposal. It’s still used in some places, like the default mode of the confluence-xml package and probably more broadly all uses of the nested page migrator I don’t know about.

I guess we now need to decide what to do:

  1. propose to fix the XWiki export
  2. propose to deprecate the parent feature.

The export feature not producing the parent property lets me think that the parent property handling might already be missing in some places.

1 Like