Two Modules In The Same Position - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Two Modules In The Same Position

CL

Christoph Lammel

Helix Framework 2 years ago

I am upgrading a website from Joomla 3 (Helix Ultimate 2.0.7) to Joomla 4 (Helix Ultimate 2.0.11) on a test server. Under J3 I placed two modules in the same module position ("feature") side by side with css (#sp-feature .sp-column {display: flex; flex-flow: row wrap; justify-content: center;}. Works great. It doesn't work under J4 and Helix Ultimate 2.0.11. The second module is placed outside the "sp-feature" div. Is this a bug? Or am I doing something wrong.

The source code looks like this:

Jommla 3 and Helix Ultimate 2.0.7 <div class="row"> <div id="sp-feature" class="col-lg-12 "> <div class="sp-column"> <div class="sp-module offset ">...</div> <div class="sp-module offset ">...</div> </div> </div> </div>

Joomla 4 and Helix Ultimate 2.0.11 <div class="row"> <div id="sp-feature" class="col-lg-12 "> <div class="sp-column"> <div class="sp-module ">...</div> </div> </div> <div class="sp-module ">...</div> </div>

I look forward to an answer and maybe even a solution to the problem.

0
13 Answers
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 2 years ago #95198

Hi

Thanks for contacting us. Could you please give me a screenshot of your issue?

-Regards.

0
CL
Christoph Lammel
Accepted Answer
2 years ago #95199

Sorry but how can I do this?

0
CL
Christoph Lammel
Accepted Answer
2 years ago #95200

Okay, find a solution to show the screenshots:

0
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 2 years ago #95312
0
CL
Christoph Lammel
Accepted Answer
2 years ago #95336

Okay, this is what it looks like in Joomla 3 with Helium Ultimate 2.0.7:

And so under Joomla 4 with Helix Ultimate 2.0.11:

The problem is that on Joomla 4 and Helix Ultimate 2.0.11 the two modules (sp-module) are not included in the same div container even though both are assigned the same position on the same page.

0
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 2 years ago #95536

Give me a screenshot of that please.

0
CL
Christoph Lammel
Accepted Answer
2 years ago #95547

Next try: this is what it looks like in Joomla 3 with Helium Ultimate 2.0.7: Code: http://www.sport.med.tum.de.devweb.mwn.de/images/screenshots/Joomla-3-helix-ultimate-207-code.png Frontend: http://www.sport.med.tum.de.devweb.mwn.de/images/screenshots/Joomla-3-helix-ultimate-207-screen.png

And so under Joomla 4 with Helix Ultimate 2.0.11: Code: http://www.sport.med.tum.de.devweb.mwn.de/images/screenshots/Joomla-4-helix-ultimate-2011-code.png Frontend: http://www.sport.med.tum.de.devweb.mwn.de/images/screenshots/Joomla-4-helix-ultimate-2011-screen.png

The problem is that on Joomla 4 and Helix Ultimate 2.0.11 the two modules (sp-module) are not included in the same div container even though both are assigned the same position on the same page.

0
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 2 years ago #95722

Give me your site URL please.

0
CL
Christoph Lammel
Accepted Answer
2 years ago #95786

The working site (Joomla 3 with Helium Ultimate 2.0.7) is here: http://www.sport.med.tum.de.devweb.mwn.de/de/fortbildung-lehre/lehre

Unfortunately, I have only installed the "faulty" page on a local test server so far.

0
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 2 years ago #95929

Hi

Use this custom CSS

.mod-article-single.single.mod-article-single__offset .item__module{
    max-width: unset !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
}

Path towards custom CSS: Extensions>Templates>Styles> Click on your current default template name then choose Template Options. Then find custom CSS within the custom code.

-Regards.

0
CL
Christoph Lammel
Accepted Answer
2 years ago #96007

Thx for answer, but that do not solves the problem I have. On Jommla 3 and Helix Ultimate 2.0.7 I placed two modules in the same module position [feature] and aligned them side by side via css. Works great. Both modules are placed here within the div with id="sp-feature" .

<section id="sp-feature-bottom">
  <div class="row">
    <div id="sp-feature" class="col-lg-12 ">
      <div class="sp-column ">
        <div class="sp-module offset">
          <div class="sp-module-content">
            <div class="mod-article-single single mod-article-single__offset" id="module_155"> ........ </div>
          </div>
        </div>
        <div class="sp-module offset">
          <div class="sp-module-content">
            <div class="mod-article-single single mod-article-single__offset" id="module_153"> ........ </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>

If I do this on Joomla 4 and Helix Ultimate 2.0.11 the second module is placed here outside and after the div with id="sp-feature". The code looks so:

<section id="sp-feature-bottom">
  <div class="row">
    <div id="sp-feature" class="col-lg-12 ">
      <div class="sp-column ">
        <div class="sp-module article-single offset">
          <div class="sp-module-content">
            <div id="mod-custom212" class="mod-custom custom"> ........ </div>
          </div>
        </div>
      </div>
    </div>
    <div class="sp-module article-single offset">
      <div class="sp-module-content">
        <div id="mod-custom213" class="mod-custom custom"> ........ </div>
      </div>
    </div>
  </div>
</section>

As you can see, the 2nd custom module, which should actually be inserted inside the div with id="sp-feature", is only inserted after the closed div. Here, in my opinion, somehow faulty source code is generated. I hope that I was able to describe the problem clearly.

0
Pavel
Pavel
Accepted Answer
2 years ago #96014

Hi Christoph. If you allow...

I don't think this is a bug. Most likely you have a non -closed tag in one of your modules. But in any case, the reason can be determined only by accessing your site and using the code inspector. There is no other way to determine the cause.

You can check your modules in this way. Turn OFF them, instead, place two new ones with the same class article-single offset and with simple content, and see what will happen.

And one more thought. Сlasses like article-single , offset are a very common class names. This can be involved in Joomla or template files and affect your modules. Try to rename the classes. Always come up with the unique names of classes that are different from generally accepted terminological names.

Many developers use prefix to unique class names. For example, the JoomShaper team uses the prefix sp-. Come up with your prefix and use it.

Something like prfx-article-single, prfx-offset

0
CL
Christoph Lammel
Accepted Answer
2 years ago #96082

Thank you for your helpful reply and shame on me.

In fact, I had a buggy code inside the custom module that was responsible for my problem.

Now I know that I was the problem ;-)

0