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

Impossible to use embed when there are duplicate AvailableViewModes #1363

Closed
wants to merge 1 commit into from
Closed

Impossible to use embed when there are duplicate AvailableViewModes #1363

wants to merge 1 commit into from

Conversation

SerheyDolgushev
Copy link
Contributor

  1. Install https://github.com/ezsystems/ezpublish-legacy
  2. settings/override/content.ini.append.php:
...
[embed]
AvailableViewModes[]
AvailableViewModes[]=embed
AvailableViewModes[]=embed-inline
AvailableViewModes[]=full
AvailableViewModes[]=line
AvailableViewModes[]=embed
AvailableViewModes[]=custom
  1. Edit any object in admin: try to add embed with custom view (or any other view).
  2. Disable editor and check content of embed object:
<embed view="5" size="medium" custom:offset="0" custom:limit="5" href="ezobject://59" />

Expected result:

<embed view="custom" size="medium" custom:offset="0" custom:limit="5" href="ezobject://59" />

https://jira.ez.no/browse/EZEE-2042

@SerheyDolgushev
Copy link
Contributor Author

@glye can you please have a look at this PR and suggest further actions?

@glye
Copy link
Member

glye commented May 12, 2020

The simple fix is to not have duplicate AvailableViewModes 😉

Help my tired brain: Why does the duplicate setting change the view to a number?

@SerheyDolgushev
Copy link
Contributor Author

Sorry, not sure about that now. And I don't think it worth spending time on finding the answer to that question. I guess it is related to the way how the arrays from ini settings are merged.

Closing this PR.

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