Stylesheets written even when the output isn't html

11 years 4 months ago #213536 by cavo789
Hi

I'm the developper of a component called AllEvents; a free event's manager for Joomla. One of the feature of my component is to allow to make enrolment for an event. The event's page then display the list of enrolled people. Below the list, there is a link to make possible to download the array as a CSV stream.

Everything works fine except when the CB Login module is published on the same page : CB output string like "<link type="text/css" rel="stylesheet" href="avonture.be/allevents/components/com_comprofiler/plugin/templates/default/template.css"/>" even if the returned document type isn't html.

You can see the problem here : avonture.be/allevents/fr/component/allevents/display/event/default/4-20eme-diner-eglise-saint-christophe?Itemid=275

Scroll down and below the list of people, clic on the CSV button and open the returned stream with a text editor.

When I unpublish CB Login, the returned CSS is correct. I've this problem on my demo sites and users of my component have the same issue.

Do you think that this situation is well so coded in CB (no document type check) and is it possible to solve this in a future version of CB ? Thanks a lot.

I suggest to check the returned value of JFactory::getDocument()->getType() and to write css statements only when the returned value is 'html'.

Hope this can help.

Thanks for this great extension !

Developper of aeSecure, optimizing and securing your web Apache sites

Please Log in to join the conversation.

11 years 4 months ago #213577 by krileon
We already check for this with the below.

if ( $this->_output == 'html' ) {

In our _renderHead function. My guess is you've something using &format=component, which will load in CSS as its an HTML output.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

11 years 4 months ago #213579 by cavo789
Hi Krileon

Thanks for the answer.

My complete URL is like this one : avonture.be/allevents/index.php?option=com_allevents&view=event&layout=participants&task=display&ei=4&tmpl=component&format=csv

So I've &tmpl=component&format=csv.

How is initialized your $this->_output variable ?

Thanks

Developper of aeSecure, optimizing and securing your web Apache sites

Please Log in to join the conversation.

9 years 2 months ago #257238 by quickepitchenaeres
Replied by quickepitchenaeres on topic Re: Stylesheets written even when the output isn't html
hi,

have you solved it ?

Please Log in to join the conversation.

9 years 2 months ago #257249 by cavo789
Hello

No, never. I've abandonned. The problem was still there when I've stop to look at it.

Now keep in mind that my post is very old; perhaps now is it solved with CB 2.0. Don't know.

Bye

Developper of aeSecure, optimizing and securing your web Apache sites

Please Log in to join the conversation.

9 years 2 months ago #257307 by quickepitchenaeres
Replied by quickepitchenaeres on topic Re: Stylesheets written even when the output isn't html
idem avec CB 2.0

merci pour la réponse

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.247 seconds

Facebook Twitter LinkedIn