[DEV] Button menu

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
warmweer
Jr. Extension Validator
Posts: 5325
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: [DEV] Button menu

Post by warmweer »

Gumboots wrote:
Mon Mar 02, 2020 10:44 pm
This is the extension topic. :D
:oops: OK, somehow I had the impression it was posted in another forum (3.3 Support?). Time to give my eyes a rest.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.
User avatar
Gumboots
Registered User
Posts: 330
Joined: Fri Oct 11, 2019 1:59 am

Re: [DEV] Button menu

Post by Gumboots »

Cubguy501 wrote:
Mon Mar 02, 2020 9:20 pm
Tried this on my test forum 3.3 and get the following error

Code: Select all

phpBB encountered an error building the container due to an installed extension. For this reason, all extensions have been temporarily disabled. Please try purging your forum cache. All extensions will automatically be re-enabled once the container error is resolved. If this error continues, please visit phpBB.com for support.


Exception: The file "/homepages/26/d340719664/htdocs/snazoo/ext/dmzx/buttonmenu/config/services.yml" does not contain valid YAML: The reserved indicator "@" cannot start a plain scalar; you need to quote the scalar at line 7 (near "- @service_container").

#0 /homepages/26/d340719664/htdocs/snazoo/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php(117): Symfony\Component\DependencyInjection\Loader\YamlFileLoader->loadFile('/homepages/26/d...')
#1 /homepages/26/d340719664/htdocs/snazoo/phpbb/extension/di/extension_base.php(99): Symfony\Component\DependencyInjection\Loader\YamlFileLoader->load('services.yml')
#2 /homepages/26/d340719664/htdocs/snazoo/phpbb/extension/di/extension_base.php(63): phpbb\extension\di\extension_base->load_services(Object(Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationContainerBuilder))
#3 /homepages/26/d340719664/htdocs/snazoo/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php(71): phpbb\extension\di\extension_base->load(Array, Object(Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationContainerBuilder))
#4 /homepages/26/d340719664/htdocs/snazoo/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php(39): Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass->process(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
#5 /homepages/26/d340719664/htdocs/snazoo/vendor/symfony/dependency-injection/Compiler/Compiler.php(140): Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass->process(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
#6 /homepages/26/d340719664/htdocs/snazoo/vendor/symfony/dependency-injection/ContainerBuilder.php(789): Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
#7 /homepages/26/d340719664/htdocs/snazoo/phpbb/di/container_builder.php(203): Symfony\Component\DependencyInjection\ContainerBuilder->compile()
#8 /homepages/26/d340719664/htdocs/snazoo/common.php(115): phpbb\di\container_builder->get_container()
#9 /homepages/26/d340719664/htdocs/snazoo/adm/index.php(23): require('/homepages/26/d...')
#10 {main}
Appears to be an easy fix. Tables.yml and services.yml seem to need single quotes added in a few places. Have not tested it with the changes myself yet, but will do so over the next couple of days (when I get around to updating a test site to 3.3, which won't be tonight, coz I'm knackered).

Original services.yml

Code: Select all

imports:
    - { resource: tables.yml }
services:
    dmzx.buttonmenu.listener:
        class: dmzx\buttonmenu\event\listener
        arguments:
            - @service_container
            - @config
            - @template
            - @user
            - @dbal.conn
            - %dmzx.buttonmenu.table.menu_buttons%
            - %dmzx.buttonmenu.table.menu_colors%
        tags:
            - { name: event.listener }
Updated services.yml

Code: Select all

imports:
    - { resource: tables.yml }
services:
    dmzx.buttonmenu.listener:
        class: dmzx\buttonmenu\event\listener
        arguments:
            - '@service_container'
            - '@config'
            - '@template'
            - '@user'
            - '@dbal.conn'
            - '%dmzx.buttonmenu.table.menu_buttons%'
            - '%dmzx.buttonmenu.table.menu_colors%'
        tags:
            - { name: event.listener }
Original tables.yml

Code: Select all

parameters:
    dmzx.buttonmenu.table.menu_buttons: %core.table_prefix%menu_buttons
    dmzx.buttonmenu.table.menu_colors: %core.table_prefix%menu_colors
Updated tables.yml

Code: Select all

    dmzx.buttonmenu.table.menu_buttons: '%core.table_prefix%menu_buttons'
    dmzx.buttonmenu.table.menu_colors: '%core.table_prefix%menu_colors'
Cubguy501
Registered User
Posts: 137
Joined: Mon Feb 07, 2011 8:39 pm

Re: [DEV] Button menu

Post by Cubguy501 »

Yep that seemed to fix that!
User avatar
Gumboots
Registered User
Posts: 330
Joined: Fri Oct 11, 2019 1:59 am

Re: [DEV] Button menu

Post by Gumboots »

Oh good. I've been sidetracked into other things so hadn't got around to testing it yet. Nice of you to play guinea pig for me. :D
xmrdo
Registered User
Posts: 59
Joined: Fri Jul 19, 2019 11:10 pm
Location: B'ham, UK

Re: [DEV] Button menu

Post by xmrdo »

guys , just I wanted to report that this menu does not "stretch" to the screen width while on mobile browser mode... - you can test it under eg chrome and set the device to mobile while on the dev console.
thx (tested on phpBB 3.3.0)
Post Reply

Return to “Extensions in Development”