• Hi there,
    Thanks so much for this plugin.

    Unfortunately I can’t make it work when in conjunction with frameworks such as Gantry5.

    It has conflicts with Twig:
    “Cannot declare interface Twig_CacheInterface, because the name is already in use”
    “Argument 1 passed to Twig\Lexer::__construct() must be an instance of Twig\Environment, instance of Twig_Environment given, called in …/wp-content/plugins/fontsampler/vendor/twig/twig/lib/Twig/Environment.php on line 650”

    Can you solve this or do you know any workaround please?
    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author kontur

    (@kontur)

    Hey,

    sorry for the late reply. I have just now updated the Twig library included in the plugin. If you have a chance, could you test with Fontsampler 0.4.10 and let me know if the issue is still persisting?

    Best,
    Johannes

    Thread Starter marcosrego

    (@marcosrego)

    Hey @kontur thanks for updating.

    Unfortunately it’s still giving an error.

    On the settings page of FontSampler is tell me:
    “Whoops \ Exception \ ErrorException (E_COMPILE_ERROR)
    Declaration of Twig\NodeVisitor\MacroAutoImportNodeVisitor::enterNode(Twig\Node\Node $node, Twig\Environment $env): Twig\Node\Node must be compatible with Twig\NodeVisitor\NodeVisitorInterface::enterNode(Twig_NodeInterface $node, Twig\Environment $env)”
    On Gantry it shows:
    Interface ‘Twig_CacheInterface’ not found.

    Best regards,
    Marcos

    Plugin Author kontur

    (@kontur)

    To be frank I don’t know how to handle this issue. To me it seems the likely cause is two different plugins using the same library and possibly different versions of it. The way the Fontsampler plugin code includes the Twig library should be specific to the plugin, yet it seems to conflict on some global level.

    Have you filed a similar issue with Gantry? Assuming they are a framework they are more likely to have encountered this issue before with other plugins, I’d be curious to hear their approach to how this could get resolved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conflict with Gantry’ is closed to new replies.