rainlab / blog-plugin

A robust blogging platform.
MIT License
169 stars 143 forks source link

Setting page title as post title using onEnd() not working #584

Closed gvanto closed 8 months ago

gvanto commented 8 months ago

Basically same issue as here: https://github.com/rainlab/blog-plugin/issues/326

The page title is not being set.

Version info:

"require": {
        "php": ">=7.2.9",
        "october/rain": "^2.0",
        "laravel/framework": "^6.0",
        "october/system": "^2.0",
        "october/backend": "^2.0",
        "october/cms": "^2.0",
        "october/media": "^2.0",
        "october/editor": "^2.0",
        "rainlab/pages-plugin": "^1.4",
        "rainlab/user-plugin": "^1.5",
        "lovata/toolbox-plugin": "^1.34",
        "alxy/captcha-plugin": "^1.0",
        "october/drivers-plugin": "^1.1",
        "lilessam/frontendmailsender-plugin": "^1.0",
        "rainlab/blog-plugin": "^1.7"
    },
gvanto commented 8 months ago

I have the latest version of ocms 2 it seems: image

but the fix merged in at https://github.com/rainlab/blog-plugin/issues/326 doesn't seem to fix it?

gvanto commented 8 months ago

OK found the issue: my (default) layout was trying to access the (newly set) page title inside onInit (needed to ALSO be in onEnd()).