Column macro very buggy, almost impossible to use

Most of the time when I try to use the column macro to create a layout on a page, one of two things happens: either the macro code gets scrambled and HTML code gets inserted in places where it does not belong or the preview of the page just deletes its whole content including the title.

To reproduce:

  1. create page
  2. add column macro (e.g. 33% width)
  3. try to add second column macro (also 33% width), which is normally not possible in the WYSIWYG editor, because there’s no way to get “underneath” the first column macro
  4. add new paragraph after first macro (using the little red arrow reading Insert new paragraph here on the right-hand side
    5a click on preview
    6a the whole page is now empty, including the title
    5b click on ** Source** to reveal code like this:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><body><!--startmacro:column|-|width="33%"|-|test column 1--><div data-xwiki-non-generated-content="java.util.List&lt;org.xwiki.rendering.block.Block&gt;" data-xwiki-wikimacrocontent="true" class="xwiki-metadata-container"><p>test column 1</p></div><!--stopmacro--><p>&nbsp;<!--startmacro:column|-|width="33%"|-|test column 2--><!--stopmacro--></p><div style="width: 33%" class="macro-column"><p><span data-xwiki-non-generated-content="java.util.List&lt;org.xwiki.rendering.block.Block&gt;" data-xwiki-wikimacrocontent="true" class="xwiki-metadata-container">test column 2</span></p></div><!--stopmacro--><p>&nbsp;</p></body></html>

the main problem seems to be the inserting paragraphs, because it somehow inserts it into the column macro? When I prepare a page with enough newlines from the start for each column macro, it works and it also works with the source view, but this is not a solution for our non tech-savvy users who are using the UI for this.

Is this a bug I should report in JIRA? If so, where exactly? In the CKEditor section?

Thanks in advance!

Hello,

Do you mean the column macro from the Column Macro extension?

If that’s the case, this extension seems retired.

Hi, thanks for the quick answer, but this does not seem to be the linked macro, as you can see from my screenshot here:

column_macro_not_installed

Unless I’m missing something, it seems like we are talking about the same extension.

If you look at the documentation, it is advised to use https://extensions.xwiki.org/xwiki/bin/view/Extension/Container%20Macro instead.
Note that this extension does not seems much active either. is part of XWiki Standard.

My screenshot shows that the extension in question is not even installed on my instance. Thanks for suggesting the other extension, but it is not very user-friendly either, I’m afraid. I have users who are not comfortable with the source view and working with it.

I find it very peculiar that one of Confluence’s most basic features (page layout via toolbar) is not possible in Xwiki (yet?), because as of now there does not seem to be an easy way for a user to create a page layout (and edit it) via the GUI?

Sorry, my mistake.

I’m not sure to get what you mean by “column macro” in this case.

Sorry for the confusion, I tried to look up the exact extension I’m using, but there’s no macro with “column” installed on my instance, so it has to be included in some sort of meta extension? :thinking:

Anyway, when I insert it via UI, this is what I choose:

insert_column_macro

So, adding to this: is there an easy solution for creating a page layout with multiple columns in Xwiki?

There’s no column macro by default in XS, so you (or someone else) must have installed some extension contributing this macro.

This is the current recommendation for columns. However, we don’t have a specific editor for the WYSIWYG editor and thus it’s not very friendly to edit it using the WYSIWYG.

Note: I don’t see how any other column macro would be simpler to edit in the WYSIWYG editor since that would require a specific editor for CKEditor.

@Qua8zoh6 feel free to raise a jira on XWiki Platform - XWiki.org JIRA about the WYSIWYG aspect.

Okay, just to be clear: my users who are used to the (very convenient and useful) layout toolbar in Confluence (see screenshot below) have to write wiki code into a container macro to achieve simple columns?

Confluence layout toolbar:

I was under the impression that something like this was available in Xwiki, this is very disappointing, to be honest.

I don’t know of any other solution for columns and WYSIWYG editor (note that it’s not such a common need for a wiki to use a column layout which is probably why we don’t have this ATM).

Now it’s possible to have the feature quickly, if you’re ready to sponsor it. See https://dev.xwiki.org/xwiki/bin/view/Community/Contributing#HSponsoraFeatureorBug

Thanks

Thank you for clarifying this and thank you for your answers and time.

Our solution (for now) is a page template which allows editing content in the WYSIWYG editor (unlike the container one, where the only edit option is via the macro popup.

Source for our three columns page template:

{{layout}}
{{layout-section ac:type="three_equal"}}
{{layout-cell}}
column 1
{{/layout-cell}}

{{layout-cell}}
column 2
{{/layout-cell}}

{{layout-cell}}
column 3
{{/layout-cell}}
{{/layout-section}}
{{/layout}}

For the record: it was part of the ProMacros extension

ok, I wasn’t aware of it. I guess you could/should contact XWiki SAS then since we don’t have knowledge of this macro here on this forum (it’s only for extensions on extensions.xwiki.org and more generally for xwiki.org content).

Ah, I see, I was not aware this wasn’t the right place for questions about those macros (plus, in the beginning of this thread, I did not know it was the ProMacros package).

For what it’s worth;

I 'm using css on my wiki:
.cssname {
border-style:hidden;
width: 25%
}

and had something similiar for the left ‘collumn’ which I now discontinued in the pages’ templates; I noticed that there’s some issue with velocity code outputting xwiki syntax while the velocity is within an html bracket. I kept (sporadically) getting a velocity macro that outputs html every time the page is editing.

I no longer have this issue after removing the html brackets (I used the following in the template;)

(% class="cssname" %)
(((
Left side of page
)))

This issue with velocity within html might be similiar.

Thanks for the added information!

1 Like