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

If a site's breakpoints change, the widgets break. #77

Open
benlk opened this issue Oct 23, 2018 · 0 comments
Open

If a site's breakpoints change, the widgets break. #77

benlk opened this issue Oct 23, 2018 · 0 comments
Labels
Milestone

Comments

@benlk
Copy link
Collaborator

benlk commented Oct 23, 2018

Here we see an array of options for a widget:

PHP message: array (
  'identifier' => 'cheese',
  'lazyLoad' => '1',
  'breakpoints' => NULL,
  'sizes' => 
  array (
    'mobile' => '',
    'desktop' => '',
  ),
  'size' => NULL,
  'widget_class' => 'default',
  'hidden_desktop' => 0,
  'hidden_tablet' => 0,
  'hidden_phone' => 0,
  'title_link' => '',
)

And here's what happens on the widget form, when the site has gone from using the named breakpoints "mobile" and "desktop" to using the named breakpoints "one" and "two":

PHP message: PHP Notice:  Undefined index: one in /wp-content/plugins/doubleclick-for-wp/dfw-widget.php on line 111
PHP message: PHP Notice:  Undefined index: two in /wp-content/plugins/doubleclick-for-wp/dfw-widget.php on line 111

The form and the widget should check to make sure that the widget breakpoint saved in the widget settings we're trying to get the sizes for exists in the site's breakpoint settings.

Sites are not likely to constantly change their breakpoints, so this is not a high-priority issue.

@benlk benlk added the bug label Oct 23, 2018
@benlk benlk added this to the 0.4 milestone Oct 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant