OleVik / grav-plugin-static-generator

Indexing and static generation of Page(s) for Grav.
MIT License
22 stars 1 forks source link

TestStaticDataCommand.php error on any action #3

Closed pawelandrzejewski89 closed 4 years ago

pawelandrzejewski89 commented 4 years ago

Hi, I'm trying to use the plugin to generate static content, but any try of use (index, page, test) returns same error: ``

`root@x:/home/ubuntu/html# bin/plugin static-generator test '/blog' Testing data index

In TestStaticDataCommand.php line 121:

InvalidArgumentException: Invalid resource theme:// in /var/www/html/vendor/rockettheme/toolbox/ResourceLocator/src/UniformResourceLocator.php:435 Stack trace:

0 /var/www/html/vendor/rockettheme/toolbox/ResourceLocator/src/UniformResourceLocator.php(403): RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator->find('theme', 'templates', true, true, false)

1 /var/www/html/vendor/rockettheme/toolbox/ResourceLocator/src/UniformResourceLocator.php(308): RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator->findCached('theme://templat...', true, true, false)

2 /var/www/html/system/src/Grav/Common/Twig/Twig.php(97): RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator->findResources('theme://templat...')

3 /var/www/html/user/plugins/static-generator/classes/Data/TestData.php(42): Grav\Common\Twig\Twig->init()

4 /var/www/html/user/plugins/static-generator/cli/TestStaticDataCommand.php(117): Grav\Plugin\StaticGenerator\Data\TestData->setup('/blog', Object(Symfony\Component\Console\Output\ConsoleOutput))

5 /var/www/html/system/src/Grav/Console/ConsoleCommand.php(41): Grav\Plugin\Console\TestStaticDataCommand->serve()

6 /var/www/html/vendor/symfony/console/Command/Command.php(255): Grav\Console\ConsoleCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

7 /var/www/html/vendor/symfony/console/Application.php(917): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

8 /var/www/html/vendor/symfony/console/Application.php(269): Symfony\Component\Console\Application->doRunCommand(Object(Grav\Plugin\Console\TestStaticDataCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\C

omponent\Console\Output\ConsoleOutput))

9 /var/www/html/vendor/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

10 /var/www/html/bin/plugin(152): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput))

11 {main}

test [-b|--basename [BASENAME]] [-c|--content] [-e|--echo] [-w|--wrap] [-f|--force] [--] []`

Looks like it failed on content validation. Grav is up to date, plugins also are. Any idea?:)

SteveMcArthur commented 4 years ago

Yeah - I'm getting this too

pawelandrzejewski89 commented 4 years ago

This same issue is on another grav plugin: https://github.com/getgrav/grav-plugin-email/issues/128#issuecomment-590375041 and it also been reported a few days ago.

In both cases plugin's are using ResourceLocator form rocketheme vendor - maybe the issue is in communication between ResourceLocator and Plugin?

SteveMcArthur commented 4 years ago

OK - just tested with grav version 1.6.17 and no problems.

OleVik commented 4 years ago

There are inconsistencies upstream in the betas and release candidates for core 1.7, so the upcoming refactor for this plugin will be locked to Grav v1.6 until v1.7 stabilizes.

pawelandrzejewski89 commented 4 years ago

I can confirm that: 1.6.17 works, 1.6.19 also work , 1.6.20 also work,

1.6.21 doesn't work.

pawelandrzejewski89 commented 4 years ago

Info from other module: "The issue is caused by this change https://github.com/getgrav/grav/blob/1.7/UPGRADE-1.7.md#cli-1" "Here is the change itself getgrav/grav@48170d2"

OleVik commented 4 years ago

Yes, these new changes need to be integrated for v2.0.0. It is unfortunate that they were introduced for 1.6.21, and not delayed until 1.7. This is why I need to have a distinct version for 1.6 and 1.7; there's just too many changes to integrate until 1.7 stabilizes.

OleVik commented 4 years ago

Implemented for v2.0.0-beta.1, which is tested with Grav 1.6.22. The dependencies listed in blueprints.yaml should lock it to this version, if the GPM parses it correctly.

OleVik commented 4 years ago

The refactor for v2.0.0 is now released, tested with Core v1.6.22 and v1.7.0-rc.7. Note that the plugin requires Grav v1.6.21 or higher, or v1.7.0-rc.6 or higher for testing-releases.