news icon indicating copy to clipboard operation
news copied to clipboard

Workspace problem: news image is not shown to regular editor in preview, only to admin

Open HorstBaumann opened this issue 2 years ago • 10 comments

Current Behavior As an draft-editor, who can create news items everything works fine, except the rendering of the news image (falMedia) in draft preview (list and detail view). To an admin user the image is rendered.

By adding <f:debug>{newsItem}</f:debug>, I can see: the falMedia node is empty for the regular editor - to the admin everything is fine (falMedia contains all informations) The same behavior occures with related files (falRelatedFiles).

In LIVE workspace - there are no errors at all.

Expected behavior/output There must be a difference between admins and editors, how the extension handles the rendering of attached references (falMedia. falRelatedFiles, .... ), which are not in LIVE workspace.

Environment

  • TYPO3 version(s): 11.5.24
  • news version: 10.0.3
  • workspace version: 11.5.24
  • Is your TYPO3 installation set up with Composer (Composer Mode): no
  • OS: Linux 4.18.0-372.19.1.el8_6.x86_64
  • PHP: 8.1.9

Possible Solution When I manually change the values t3ver_state and t3ver_wsid from 1 to 0 in sys_file_reference, the images are rendered for the normal editor.

HorstBaumann avatar Feb 24 '23 17:02 HorstBaumann

thanks for creating the issue. IMO this is more a core issue than news as everything there is core. do you agree?

georgringer avatar Feb 24 '23 19:02 georgringer

thanks for your quick response. when I create a regular tt_content element with an attached image, it works. So I think it might be a news problem ...?

HorstBaumann avatar Feb 24 '23 21:02 HorstBaumann

tt_content uses a dataprocessor, news uses extbase.

what about just using extension builder, setting ab a minimalistic extension and retest. that would be awesome as well for later debugging in core without requiring the news ext

georgringer avatar Feb 28 '23 13:02 georgringer

I don't understand - why building an own extension? It's a regular news setup, which works perfectly, except this little issue in combination with workspaces

HorstBaumann avatar Feb 28 '23 17:02 HorstBaumann

the question is: is it a news issue or an extbase issue and to answer that a tiny simple MVP extension would make sense to test this. if it is a core issue, this is the wrong issue tracker

georgringer avatar Mar 01 '23 07:03 georgringer

OK understood. I built a simple MVP extension - the file relation works within the draft workspace for a non-admin editor. so, the issue seems to news related...?

HorstBaumann avatar Mar 01 '23 16:03 HorstBaumann

wanna share the ext? thanks a lot!

georgringer avatar Mar 02 '23 07:03 georgringer

sure: https://github.com/HorstBaumann/test-ext

it's just a very simple extension - build with extensionbuilder in 2 minutes.

HorstBaumann avatar Mar 02 '23 10:03 HorstBaumann

If it helps, I checked the issue also with "mask" (repeating content - so its stored not directly in tt_content) - the issue does not appear there

HorstBaumann avatar Mar 02 '23 10:03 HorstBaumann

The issue also remains in news version 11.0.0

HorstBaumann avatar Mar 14 '23 16:03 HorstBaumann