No Code Attached Yet bug
avatar sandewt
sandewt
8 Feb 2022

Steps to reproduce the issue

  • Create a cutom module.
  • Activate the title of this module.
  • Load this module into an article with {loadposition ....): Article edit > CMS content > Module.

Expected result

The title of the loaded module is visible.

Actual result

The title of the loaded module is NOT visible.

System information (as much as possible)

Joomla 4.0.6

Additional comments

It does work in J3.10.5

avatar sandewt sandewt - open - 8 Feb 2022
avatar sandewt sandewt - change - 8 Feb 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 8 Feb 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Feb 2022
avatar brianteeman
brianteeman - comment - 8 Feb 2022

its because the chrome "none" doesnt output the title which i think is wrong

avatar sandewt
sandewt - comment - 8 Feb 2022

@brianteeman

I see that the title can be made visible under the 'Module Style'.
By default the title should be visible, as you indicate.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36965.

avatar brianteeman
brianteeman - comment - 8 Feb 2022

its the same problem with the class
For me all default module settings should exist even if the chrome is none

avatar brianteeman
brianteeman - comment - 8 Feb 2022

The official answer is that you should set the chrome in the module as when you insert a module into content there is no chrome to inherit.

image

You can also set the chrome when you insert the module into the content

Within content this plugin loads a Module by ID, Syntax: {loadmoduleid 1} or a Module by position, Syntax: {loadposition user1} or a Module by name, Syntax: {loadmodule mod_login}. Optionally can specify module style and for loadmodule a specific module by title, Syntax: {loadmodule mod_login,module title,style}.

avatar Fedik
Fedik - comment - 8 Feb 2022

We have an option for that:
Screenshot 2022-02-08_12-16
But as I see it is sets for xhtml that not exist in J4, or I missed something (that probably a bug).

Or use {loadposition position-name,html5} then all be good.

its because the chrome "none" doesnt output the title which i think is wrong

To include "title" in to the module "content" output we need to change whole rendering API for Module, that we cannot do for J4.

avatar Fedik
Fedik - comment - 8 Feb 2022

It does work in J3.10.5

yeah, J3 has xhtml Chrome style,
so looks like a bug in the plugin configuration, the style field contains non existing chrome styles

avatar Fedik Fedik - change - 8 Feb 2022
Labels Added: bug
avatar Fedik Fedik - labeled - 8 Feb 2022
avatar brianteeman
brianteeman - comment - 21 Feb 2022

YEah from what I can see the plugin is fubar

avatar altrasoluzione
altrasoluzione - comment - 28 Jan 2023

Hi, are there any news about this bug? Or are there any workarounds?
Thank you!

avatar Fedik
Fedik - comment - 29 Jan 2023

Specify the style in the placeholder tag, eg {loadposition position-name,html5}

avatar altrasoluzione
altrasoluzione - comment - 29 Jan 2023

Specify the style in the placeholder tag, eg {loadposition position-name,html5}

I hoped there was an alternative to replacing all instances of loadposition.
It's ok, I'll do it directly in the database.
Thank you Fedik!

avatar brianteeman
brianteeman - comment - 29 Jan 2023
avatar altrasoluzione
altrasoluzione - comment - 29 Jan 2023

#36965 (comment)

Unfortunately it is not a global solution but an operation to do on every single module. I guess it is much easier to replace all {loadposition ...} in the sql export file. Isn't it?

Thank you!

avatar brianteeman
brianteeman - comment - 29 Jan 2023

yes you have to do it on the module but if you use the module multiple times then you would only do it once

avatar sandewt
sandewt - comment - 30 Jan 2023

An additional problem is that an undesirable situation can easily arise, namely:
<p>{loadposition test}</p
This results eg in the following source code:
<p><div>Some text....</div></p>
A p-tag followed by a div-tag is undesirable.

Please your opinion.

avatar Fedik Fedik - change - 11 Feb 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-02-11 11:48:14
Closed_By Fedik
avatar Fedik Fedik - close - 11 Feb 2023
avatar Fedik
Fedik - comment - 11 Feb 2023

Please test #39839

avatar Fedik
Fedik - comment - 11 Feb 2023

An additional problem is that an undesirable situation can easily arise, namely:
<p>{loadposition test}</p>

Ideally User should not place the placeholder inside P tag,
But that is default behavior of TinyMCE, I have no idea what can be done here from our side.

avatar sandewt
sandewt - comment - 11 Feb 2023

But that is default behavior of TinyMCE, I have no idea what can be done here from our side.

@Fedik Just an idea, filtering out the p-tag or all kind of tags !?

Replace:

$regex = '/{loadposition\s(.*?)}/i';

with something like this:

$regex = '#(?:<p>)?\{loadposition\s(.*?)\}(?:</p>)?#i'; // filter p-tag

or:

$regex = '#(?:<\w>)?\{loadposition\s(.*?)\}(?:</\w>)?#i'; // filter all kind of tags

[EDIT possible b/c problem + code change]

Add a Comment

Login with GitHub to post a comment