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

Partial overwriting with config.yml not working #11

Closed
dennisbohn opened this issue May 18, 2022 · 2 comments
Closed

Partial overwriting with config.yml not working #11

dennisbohn opened this issue May 18, 2022 · 2 comments
Assignees

Comments

@dennisbohn
Copy link
Contributor

Contao: v4.13.4
Bundle: v1.0.6

I tried to add an additional viewport in "config/config.yml".

erdmannfreunde_contao_grid:
  viewports:
    - xs
    - sm
    - md
    - lg
    - xl
    - xxl

After adding the viewport I got the following error.

[2022-05-18T12:23:51.600016+02:00] request.CRITICAL: Uncaught PHP Exception TypeError: "Argument 1 passed to ErdmannFreunde\ContaoGridBundle\GridClasses::__construct() must be of the type string, array given, called in /var/www/vhosts/office.bohn.media/dpi.office.bohn.media/var/cache/prod/Container1oMqeOX/getGridClassesService.php on line 22"

I checked the arguments by changing the GridClasses.php

public function __construct(
    $rowClass,
    $columns,
    $columns_no_column,
    $viewports,
    $viewports_no_viewport,
    $column_prefixes,
    $options_prefixes,
    $pulls,
    $positioning,
    $directions,
    $options_columns
) {
    echo "---------- rowClass ----------\n";
    var_dump($rowClass);
    echo "---------- columns ----------\n";
    var_dump($columns);
    echo "---------- columns_no_column ----------\n";
    var_dump($columns_no_column);
    echo "---------- viewports ----------\n";
    var_dump($viewports);
    echo "---------- viewports_no_viewport ----------\n";
    var_dump($viewports_no_viewport);
    echo "---------- column_prefixes ----------\n";
    var_dump($column_prefixes);
    echo "---------- options_prefixes ----------\n";
    var_dump($options_prefixes);
    echo "---------- pulls ----------\n";
    var_dump($pulls);
    echo "---------- positioning ----------\n";
    var_dump($positioning);
    echo "---------- directions ----------\n";
    var_dump($directions);
    echo "---------- options_columns ----------\n";
    var_dump($options_columns);
    exit();
}

The output:

---------- rowClass ----------
array(6) {
  [0]=>
  string(2) "xs"
  [1]=>
  string(2) "sm"
  [2]=>
  string(2) "md"
  [3]=>
  string(2) "lg"
  [4]=>
  string(2) "xl"
  [5]=>
  string(3) "xxl"
}
---------- columns ----------
string(3) "row"
---------- columns_no_column ----------
array(12) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
  [3]=>
  int(4)
  [4]=>
  int(5)
  [5]=>
  int(6)
  [6]=>
  int(7)
  [7]=>
  int(8)
  [8]=>
  int(9)
  [9]=>
  int(10)
  [10]=>
  int(11)
  [11]=>
  int(12)
}
---------- viewports ----------
bool(true)
---------- viewports_no_viewport ----------
bool(true)
---------- column_prefixes ----------
array(2) {
  [0]=>
  string(3) "col"
  [1]=>
  string(8) "row-span"
}
---------- options_prefixes ----------
array(2) {
  [0]=>
  string(9) "col-start"
  [1]=>
  string(9) "row-start"
}
---------- pulls ----------
array(2) {
  [0]=>
  string(9) "pull-left"
  [1]=>
  string(10) "pull-right"
}
---------- positioning ----------
array(2) {
  [0]=>
  string(5) "align"
  [1]=>
  string(7) "justify"
}
---------- directions ----------
array(4) {
  [0]=>
  string(5) "start"
  [1]=>
  string(6) "center"
  [2]=>
  string(3) "end"
  [3]=>
  string(7) "stretch"
}
---------- options_columns ----------
array(12) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(3)
  [3]=>
  int(4)
  [4]=>
  int(5)
  [5]=>
  int(6)
  [6]=>
  int(7)
  [7]=>
  int(8)
  [8]=>
  int(9)
  [9]=>
  int(10)
  [10]=>
  int(11)
  [11]=>
  int(12)
}

The option "viewports" is used as first option now, all other options moved one further.

@denniserdmann
Copy link
Contributor

Looks like the partial extension is not working correct. We will check that.

@richardhj
Copy link
Contributor

richardhj commented Jun 9, 2022

Should be fixed with the latest release. eb44393.

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

No branches or pull requests

3 participants