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

Loading wrong mediasource on create page #13609

Closed
MrRoco opened this Issue Sep 14, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@MrRoco
Contributor

MrRoco commented Sep 14, 2017

Summary

When creating a new resource in a context where a default media source is defined in the context settings different from the default media source system setting it loads the system setting, which results in not working images.

When updating the correct media source is loaded but image preview doesn't work anymore.

Step to reproduce

  • Create multiple mediasources with different paths 1 = /uploads/1, 2 = uploads/2 etc
  • 1is default media source in system setting.
  • Create context and set default media_source 2
  • Create new page in created context
  • Add images in tv's
  • Save & reload page
  • Preview in TV's do not work + image path is incorrect

Observed behavior

When adding image through tv the wrong media source is selected.

Expected behavior

Load the correct media source from context setting in which the page is being created

Environment

Modx 2.5.6, nginx

@MrRoco

This comment has been minimized.

Contributor

MrRoco commented Oct 6, 2017

The fault seems to be in the following file: core/model/modx/processors/element/tv/renders/mgr/input/image.class.php line 15,
on page create if fetches the default context (mostly web) and the media_source belonging tot that.
When people in different user groups with different media source try to create a page in a non default context, they won't be able to select an image.

@pixelive

This comment has been minimized.

Contributor

pixelive commented Mar 14, 2018

We just reproduced this issue in MODX 2.5.7-pl.

bezumkin added a commit to bezumkin/revolution that referenced this issue Mar 16, 2018

bezumkin added a commit to bezumkin/revolution that referenced this issue Mar 16, 2018

Mark-H added a commit that referenced this issue Mar 16, 2018

Fix incorrect media source being used on image TVs when creating new …
…resource in different context [#13609]

Merge remote-tracking branch 'upstream/pr/13819' into 2.6.x

* upstream/pr/13819:
  Fix for #13609
@Mark-H

This comment has been minimized.

Collaborator

Mark-H commented Mar 16, 2018

Fixed in 2.6.2 per #13819

@Mark-H Mark-H closed this Mar 16, 2018

opengeek added a commit that referenced this issue Mar 21, 2018

Merge branch '2.6.x' into 2.x
* 2.6.x:
  Fix for #13609
  Prevent reload of login page
  resolve #13740
  Fix silent fail on login

raffy99 added a commit to raffy99/revolution that referenced this issue Nov 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment