Gitify icon indicating copy to clipboard operation
Gitify copied to clipboard

Getting a Parse Exception when running Gitify Build

Open ghost opened this issue 7 years ago • 2 comments

Summary

We want to use Gitify for an existing ModX-Installation. We installed it following the instructions and the Gitify extract command ran fine. When trying to build the database on a different machine from the extracted data it works until it comes to the step "Building modSnippet from snippets/...". At this point Gitify throws a "[Symfony\Component\Yaml\Exception\ParseException]" with an additional "Malformed inline YAML string" followed by about 32,000 characters of YAML in one line. Online YAML validators all show the YAML to be correct, up until the part where the PHP follows, of course.

Step to reproduce

Create a ModX-Installation, install a few plugins like ContentBlocks, pdotools, Babel, LangRouter, TineMCEWrapper, ... Create some custom content blocks, then extract the data using Gitify extract, commit that to a Git repository, check it out on a different machine and run Gitify build on it.

Observed behavior

It runs up to the point where it tries to build the snippets, then throws a [Symfony\Component\Yaml\Exception\ParseException]

Expected behavior

Rebuild the database.

Environment

Gitify version: Git master branch, MODX version: MODX Revolution 2.6.1-pl (traditional), Operating System: Ubuntu 16.04, MySQL version: 5.7.21, PHP version: 7.2.3

ghost avatar Mar 16 '18 08:03 ghost

Have you tried narrowing it down to a particular snippet that is failing to parse? Could it be, as the error suggests, an invalid file? There's nothing about PHP in particular that would break the YAML parsing, especially with the PHP being in the content (below the ----'s) instead of in the yaml frontmatter.

Mark-H avatar Mar 16 '18 11:03 Mark-H

Yes, in the meantime I could narrow it down to the snippet TinyMagicPublisher, which seems to come from the package TinymceWrapper. Forget about the PHP part, I accidentally submitted the whole file instead of just the YAML part into the validators. The Validators (I checked with different ones) all claim that the YAML that generates the exception is OK. I attached the file in question to this comment (renamed the extension from .php to .txt because of Github guidelines). TinyMagicPublisher.txt

ghost avatar Mar 16 '18 12:03 ghost