bwanders / dokuwiki-strata

Strata - a Semi-Structured Data plugin for Dokuwiki
https://www.dokuwiki.org/plugin:strata
17 stars 8 forks source link

I don't know what to do with the unnamed block in the '' data entry #19

Closed kepi closed 8 years ago

kepi commented 8 years ago

I have clean install of strata plugin and I'm receiving following error every time I try to add more than items in data entry:

I don't know what to do with the unnamed block in the '' data entry

I'm trying with example from your documentation:

<data user>
Full Name: John Doe
Age: 24
Contact [link]: john.doe@example.org
Friends [ref]*: Alice, Bob
</data>

If I use only two items like:

<data user>
Full Name: John Doe
Age: 24
</data>

Than it works without any problem. I tried numerous variations of data.

When I disable line 87-90 in syntax/entry.php (sanity check) then everything seams ok.

It seams to me like there is some problem in constructTree method.

kepi commented 8 years ago

Ok, correction. It doesn't work OK with those lines commented. Third and fifth item is missing (at least from display).

I forgot to mention that I'm using PHP 7 (but no related errors in error log).

bwanders commented 8 years ago

Thanks for reporting this! Based on what you're experiencing this seems to something related to PHP 7.

Unfortunately, I'm currently swamped with work until the end of February. I'll pick this up at the start of March.

nneul commented 8 years ago

I'm also seeing this on our install since upgrading server to Ubuntu 16. Any update?

nneul commented 8 years ago

Additional bit - in my case it appears to be coming from the block in getFields() and not the sanity check.

bwanders commented 8 years ago

Can you post your Dokuwiki and PHP versions?

kepi commented 8 years ago

For me it was PHP 7.0.x and Dokuwiki Detrius.

nneul commented 8 years ago

ii libapache2-mod-php7.0 7.0.4-7ubuntu2.1 amd64 server-side, HTML-embedded scripting language (Apache 2 module)

commit f847ae11f67fa5dd7c83151a0e1dc79f2e270278 Merge: e4261f2 42cbd32 Author: Andreas Gohr andi@splitbrain.org Date: Thu Apr 28 10:29:59 2016 +0200

Merge pull request #1542 from splitbrain/protectedusers

Add a protected file to the authplain config cascade
nneul commented 8 years ago

No change with dokuwiki latest

commit 33e99aba20eef5b012776ebc4db0b87284e62ac4 Author: Guy Brand gb@unistra.fr Date: Sun Jul 3 18:05:17 2016 +0200

Release preparation
bwanders commented 8 years ago

Thanks for the feedback!

I'll be looking into this issue this week.

bwanders commented 8 years ago

Fixed with 61ae6f03a0770f70f35f6e6e6b5ef360f854453c.

The issue was indeed due to PHP7. In specific, the semantics of foreach have changed in an incompatible manner. This led to some monkey-business during the handling of the syntax.