Skip to content

Changes via package not reflected in Meta::toHtml() #55

@glenncoppens

Description

@glenncoppens

Describe the bug
I've registered 2 packages, "twitter" and "facebook" (og) via the MetaTagsServiceProvider (in boot method). Eg: when using $package = Meta::getPackage('facebook') and then modifying some og tags, these changes are not reflected in the html output (using Meta::toHtml() in the base view). I have to call Meta::replacePackage($package) explicitly in the controller to make the html render the updated tags.

Is this intended behaviour? For me the replacePackage call feels a bit counter intuitive and redundant because I already registered the package to be included by default (via config).

To Reproduce

  1. Register a default package (OpenGraph)
  2. Set some default values
  3. In a Controller, get the package, change eg the title
  4. check HTML as it will not reflect the updated title

Expected behavior
it should reflect changes immediately (without replace package)

Screenshots
/

Desktop (please complete the following information):

  • OS: MacOS
  • Browser FF
  • Version /

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is neededquestionFurther information is requested

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions