Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh install SilverStripe 4.11 + StaticPublisher #379

Closed
guci0 opened this issue Jul 20, 2022 · 8 comments
Closed

Fresh install SilverStripe 4.11 + StaticPublisher #379

guci0 opened this issue Jul 20, 2022 · 8 comments

Comments

@guci0
Copy link

guci0 commented Jul 20, 2022

Hello,

I am trying to put the system together, I ran tests on a fresh installation, without Fluent - only with default pages.

// composer.json
"require": { "php": "^7.4 || ^8.0", "silverstripe/recipe-plugin": "^1.2", "silverstripe/recipe-cms": "~4.11.0@stable", "silverstripe-themes/simple": "~3.2.0", "silverstripe/login-forms": "~4.7.0@stable", "silverstripe/staticpublishqueue": "^5.2" },

sake dev/tasks/SilverStripe-StaticPublishQueue-Task-StaticCacheFullBuildTask

sake dev/tasks/ProcessJobQueueTask

Uncaught Exception TypeError: "Symbiote\QueuedJobs\Services\QueuedJobService::handleBrokenJobException(): Argument #2 ($job) must be of type Symbiote\QueuedJobs\Services\QueuedJob, null given, called in /.../vendor/symbiote/silverstripe-queuedjobs/src/Services/QueuedJobService.php on line 996" at /.../vendor/symbiote/silverstripe-queuedjobs/src/Services/QueuedJobService.php line 1052 {"exception":"[object] (TypeError(code: 0): Symbiote\QueuedJobs\Services\QueuedJobService::handleBrokenJobException(): Argument #2 ($job) must be of type Symbiote\QueuedJobs\Services\QueuedJob, null given, called in /.../vendor/symbiote/silverstripe-queuedjobs/src/Services/QueuedJobService.php on line 996 at /.../vendor/symbiote/silverstripe-queuedjobs/src/Services/QueuedJobService.php:1052)"} []

My goal is to use this with Fluent, now there are problems to make it work at all.
More about my battle with the topic:
https://forum.silverstripe.org/t/silverstripe-4-10-with-fluent-6-and-static-publisher/5431

Thanks for any help!

guci0

@GuySartorelli
Copy link
Collaborator

Sounds like the job might be failing on initialisation - can you please check if #374 gives you a more helpful error message?

@GuySartorelli
Copy link
Collaborator

Closing as #374 has been merged and is presumed to fix this. If the problem persists even with that fix, please reopen the issue.

@guci0
Copy link
Author

guci0 commented Sep 5, 2022

Unfortunately, there is still an error - I reinstalled everything

[2022-09-05 06:48:43] Running Generate static pages for all URLs and others from queue 2. [2022-09-05 06:48:43] error-log.INFO: count(): Argument #1 ($value) must be of type Countable|array, null given {"exception":"[object] (TypeError(code: 0): count(): Argument #1 ($value) must be of type Countable|array, null given at .../8.1/test/vendor/silverstripe/staticpublishqueue/src/Job.php:102)"} []

@GuySartorelli
Copy link
Collaborator

That error is very different to the one for which you originally created this issue. It is very clearly pointing to some invalid value being passed to https://github.com/silverstripe/silverstripe-staticpublishqueue/blob/8950d87b48d650ac728702eadf991c34aa6f64ef/src/Job.php#L102

Specifically, this is saying that $this->URLsToProcess is null, which indicates the job was not set up correctly.

@guci0
Copy link
Author

guci0 commented Sep 6, 2022

composer show symbiote/silverstripe-queuedjobs | grep versions
-> versions : * 4.10.1
BTW I think that error is somehow different because there was an update that returns a better error result

EDIT: I published right now via bath publish (in 4.11 tinymce won't load – Forbidden – option again) all basic pages, and works! So URLs $this->URLsToProcess after all they are – testing...

EDIT2: StaticCacheFullBuildJob only works via sake (terminal), via CMS Jobs – not, good and not good.

@guci0
Copy link
Author

guci0 commented Sep 7, 2022

Ok, I'am testing now over project with Fluent, same as yesterday test, all pages needs to be published again, even if previously published. Strange. EDIT: That's because it doesn't execute StaticCacheFullBuildJob, only after outsourced (Queued) tasks.

EDIT: In short, I do not know how to perform a full – StaticCacheFullBuildTask 😬

@lars-lemon8
Copy link
Contributor

Having the same issues as @guci0.

Situation:

  • Fluent 6
  • SS 4.11
  • Running in CLI
  • Empty Job queue
  • No configuration added for staticpublisher (no urlsToCache() ).

Run StaticCacheFullBuildTask --> added to the queue for immediate processing
Run ProcessJobQueueTask --> Argument #1 ($value) must be of type Countable|array, null given {"exception":"[object] (TypeError(code: 0): count(): Argument #1 ($value) must be of type Countable|array, null given at /data/site/vendor/silverstripe/staticpublishqueue/src/Job.php:102)"

@lars-lemon8
Copy link
Contributor

Sorry, wrong project , opened a new issue at -> silverstripe/silverstripe-staticpublishqueue#146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants