Summary

When using panel's custom content, dragging atom's into the textarea works fine (with some custom code to trigger the library of course). But once saved the atoms will not appear on display, only their sas code.

That is because the filter will run to replace the placeholder to a sas placeholder. But then the mee_field_attach_view_alter will run, and that seems to not work when its a panels custom content. It will only detect the content from the node.

Steps to reproduce

Either use a panelized page where you can add a new custom content, or simply make a panels page and add a new custom content. Drag atoms into the wysiwyg editor there. Then once some atoms have been dragged, save the custom content, and go to a display.

The atoms will appear in the SAS format instead of being rendered.

Comments

nagy.balint’s picture

Issue summary: View changes
nagy.balint’s picture

Status: Active » Needs review
StatusFileSize
new840 bytes

A patch like this could work to solve the problem.

nagy.balint’s picture

Here is a more complete patch.

It handles the case where the filter is disabled for widget.

I think the only issue could be that here we dont have any field settings, and maybe we wont have any. So resource manager is missing and default content settings.

But at least this makes it work, and the extra form alter will make the dnd appear on the form as well.

nagy.balint’s picture

I know about scald_panels_dnd module (thanks for that), however i think it would be best to eventually integrate it into the main module since that is just a few hooks to add dnd to certain places.

Also it was already done in core before for the edit module, so why not have it also for the panels module.

nagy.balint’s picture

Issue summary: View changes
nagy.balint’s picture

Actually it turns out that in IPE the modal has button tags instead of input tags, so needed to modify the js that prevents the continue click on plupload when its empty, and waits with the continue button when the upload is still in progress.

nagy.balint’s picture

Status: Needs review » Fixed

No objections in 10 days. And it seems to work fine.
Will anyways receive a bit more testing.

  • nagy.balint committed be9e8bc on 7.x-1.x
    Issue #2476933 by nagy.balint: sas to markup render will not work on...
aron novak’s picture

I reviewed the code, I have one notice, what you can consider.
We have this condition: is_string($content->content)
Can we generalize the solution for render arrays too, is it meaningful? Or is it something that simply won't happen?

Also, a little coding standard hiccup was introduced:

 320 | ERROR   | Function comment short description must be on a single line,
     |         | further text should be a separate paragraph
aron novak’s picture

Status: Fixed » Needs work
nagy.balint’s picture

Status: Needs work » Fixed

The custom content pane's $content->content is always a string, so the idea was there to detect when its a custom content pane, and then do the process on it.
For fieldable panel panes it also works since its field based.

The only way it would not work is that if its a custom pane with some ckeditor enabled textarea fields. But then we would need to loop on all items in the render array and do it for every textareas that are ckeditor enabled, but also we would have the same issue as with the custom content pane that there are no settings possible, so the user cannot say which textarea should have dnd enabled and mee enabled and which one should not.

So in this issue the goal was just to fix the case with the custom content pane, and then if there will be further need, there can be further issues about it.

Creating another issue about the coding style error.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.