Components Anywhere

css file not loaded

1 year 1 month ago #74806

Michael Barraclough's Avatar Michael Barraclough

I have 2 menu items which should produce identical results - they don't!

whatzon.info/bookings/my-schedule-1 runs JCalPro directly and behaves as expected. whatzon.info/bookings/my-schedule-2 uses the Components Anywhere plugin to run the identical command but within an article (I am trying to get the same look and feel at the top of my component output).

Nick at Joomlashack has done some debugging and says that it looks like it's because Components Anywhere isn't loading this CSS file:
whatzon.info/media/com_jcalpro/themes/ba...ians/css/default.css

Is there something I can do or is this a bug?

Michael Barraclough

1 year 1 month ago #74808

Peter van Westen's Avatar Peter van Westen Admin

Components Anywhere will load the url via the 'component' subtemplate. So:
whatzon.info/bookings/my-schedule-1?tmpl=component

As you can see, that stylesheet is also not loaded there.
So this issue is down to the component subtemplate of your template.

1 year 1 month ago #74881

Michael Barraclough's Avatar Michael Barraclough

I do not understand.

If I load the component directly it looks at the component's configuration and loads the appropriate css files . If I use exactly the same command within {component} the component does not load all the appropriate files (see above).

The menu item and the article both use index.php?option=com_jcalpro&view=events&layout=month

I now have another example of where Components Anywhere does not seem to be working. Here is the code in the article:

<hr />
<table border="0" style="width: 100%;" cellspacing="1" cellpadding="1">
<tbody>
<tr>
<td>
<h1>Michael Barraclough Guestbook</h1>
</td>
<td>{module 422}</td>
</tr>
</tbody>
</table>
<hr />
<p>{component index.php?option=com_phocaguestbook&amp;view=guestbook&amp;cid=116}</p>

The article displays the content of the table but doers not display the output of the component and does not display any error message. You can see this from the menu at the bottom of the whatzon.info page. Guestbook calls the article and does not display the output. Test calls the Guestbook directly and works. The menu item and the article both use index.php?option=com_phocaguestbook&amp;view=guestbook&amp;cid=116

1 year 1 month ago #74884

Peter van Westen's Avatar Peter van Westen Admin

Please see my previous reply. Your templates component.php subtemplate does not seem.to load the extra CSS files.
You'll need to ask the template developer for support on this. It is a template issue.

Let me know if you can reproduce the issue using the Joomla core template protostar.

1 year 3 weeks ago #75011

Michael Barraclough's Avatar Michael Barraclough

Hi Peter - this is what the JCalPro developers say

I've been able to determine that Components Anywhere is insisting on adding 'tmpl=component' when rendering the JCalPro page. JCalPro sees this and does things you don't really want.

There is an option in the plugin to 'Force Remove tmpl=component' but it doesn't seem to have any effect. At least not the effect I had hoped for. As the next step I would suggest contacting Regular Labs for clarification on that option and whether it is working as expected.

1 year 3 weeks ago #75012

Peter van Westen's Avatar Peter van Westen Admin

JCalPro sees this and does things you don't really want
This pretty much means you will not be able to use Components Anywhere to place JCalPro pages.

1 year 3 weeks ago #75013

Peter van Westen's Avatar Peter van Westen Admin

PS: That option affects links inside the component. It does not affect the initial url that gets used for collecting/rendering the component.