Support

Admin Tools

#9848 Ajax calendar module in conflict with ATP

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Monday, 25 April 2011 03:48 CDT

user29671
Hello, Nicholas.

I have installed an extension called "Qivva EventList Ajax Calendar Module", which conflicts with the ATP. The problem is: the calendar doesn't load the months following the current one, upon clicking them.

I read the ATP documentation and did my best to determine which exception was needed. I found this and added it to the "Exceptions" section ("Allow direct access to these files"):

modules/mod_eventlistcalqajax/mod_ajaxloader.php

It helped just a little, because now the ajax calendar does load the following month; but only one, after that the calendar won't load any other following month.

If you could give me an advice on this matter, I'll be thankful.

Regards,

nicholas
Akeeba Staff
Manager
Most likely you need to add more exceptions using the procedure you have already followed. After applying those exceptions and accessing your site, do you see any more non-loading items in the network view? Tip: Try CTRL-Refreshing the page to make sure nothing gets loaded from the cache instead of the server. This will let you find out all exceptions more easily.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user29671
Thanks for your fast reply, Nicholas.

My problem is that
modules/mod_eventlistcalqajax/mod_ajaxloader.php
is the only one exception that I can get following the method stated in the ATP documentation. I mean, I went through all steps (Developers Tool, resources, console, etc.) and that's the only file showing up... How do I figure out more possible exceptions?

Or could it be another kind of conflict?

Thanks for any word on this.

Regards,

nicholas
Akeeba Staff
Manager
CAn you give me the URL of a page where the calendar shows up so that I can take a look?

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user29671
Sure!

You can visit
http://www.larocka.mx/musica.html

The site is currently offline, but I have put it on-line for a while so you can take a look.

The ajax calendar module has the title "Rockalendario", you'll find it half-way down the site.

Thank you very much.

slaes
for starters

modules/templates/system/images/selector-arrow.png

modules/mod_eventlistcalqajax/modules/mod_eventlistcalqajax/mod_ajaxloader.php?modid=303&Itemid=&el_mcal_month=04&el_mcal_year=2011


nicholas
Akeeba Staff
Manager
OK, I can see what is going on. It is not a conflict with ATP, it is a bug in the module. Upon clicking on the next month arrow, it tries to fetch a url like modules/mod_eventlistcalqajax/modules/mod_eventlistcalqajax/mod_ajaxloader.php?modid=303&Itemid=&el_mcal_month=6&el_mcal_year=2011 which is, of course, invalid. See how it duplicates its own name? That's the problem you have. This URL does not correspond to a valid location in your site, goes through Joomla!'s SEF parser and Joomla! responds with a "component not found" error.

There are various reasons for this:
1. You need to set up the live_site parameter in your configuration.php file
2. You need to enable RewriteBase / in your .htaccess
3. The module may not be designed to work with SEF URLs

There's nothing you can configure on ATP to work around this issue because it's not coming from ATP at all.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user29671
Thanks, Nicholas.

I did notice the name's duplication, but I'm really new at this and don't have the knowledge to say if it's a bug or something else.

I'll go and find out about the three points you mention.

Thanks a lot for the incredible support.

Regards,

nicholas
Akeeba Staff
Manager
You're welcome! Please let me know of the outcome :)

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user29671
Nicholas, hello again,

I keep an old version of my site (made from an Akeeba backup) which has ATP 1.1.2. It has the same problem with the ajax calendar, but after I add the exception, the calendar works fine!

So it seems the new version of ATP somehow "kills" the calendar (although I know there could be other reasons as well).

I tried putting "No" to all fields in the .htaccess Maker, but still the calendar doesn't work as it's supposed to.

Also followed your recommendations:
I already set up the live_site parameter, and RewriteBase in the .htaccess is "set", which I think means is enabled. The problem remains.

Do you have some other advice?
I'm thinking of just dropping off the calendar and look for another option. But want to give it a last try.

Thanks in advance.

nicholas
Akeeba Staff
Manager
It seems that the .htaccess file generated by Admin Tools, as well as the Web Application Firewall, have nothing to do with your issue. The problem seems to be with the calendar and the way it works when you have SEF URLs turned on. You will have to contact its developer. The common mistake with those modules is that the developers don't realise that the base URL is no longer the site's root when SEF is turned on. That's a bug in the module; I can't help you to fix it, but its developer should.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

slaes
i have seen it happen many times with certain extensions. If you try something like sh404 you may be able to rewrite the base url and make it work.

user29671
Thanks, Nicholas and Slaes.

I am already trying to get the module fixed through the developer, as you recommend.

But what can be the explanation for that extension doing OK in this old version of my site
http://www.respaldo2.larocka.info/

(it's a test version, only about two or three months old).

I believe that the only big difference between that and the real version of the site (http://www.larocka.mx) is the newest ATP.

If you can share your thoughts on this, I'm sure it can help me to figure out what's going on, and then understand whatever the extension developer has to say (if I can get in touch with him/her).

Thanks again.

nicholas
Akeeba Staff
Manager
It's the third time I will try to explain why ATP has nothing to do with your problem and why the module doesn't work. Please read my replies above. I'm not going to say anything new here, I will just put what I said above in bullet points.

- Each Joomla! page emits a base tag
- The URL of the base tag is the current page's URL
- The base tag's URL is used to determine the full URL of relative URLs on the page
- E.g. base URL www.example.com/a/b/c.html and a relative URL with an href attribute of d.html result to the full url www.example.com/a/b/d.html
- All top-level pages have a base tag of www.example.com/a.html, ergo a relative URL to d.html is parsed as www.example.com/d.html
- The module emits relative URLs
- The relative URLs in the module are parsed by the browser to create full (absolute) URLs
- On top level pages, that works just fine by accident (NOT by design!)
- On pages deeper down the menu structure, the relative URLs emitted by the module in combination with the base URL of the page result to INVALID ABSOLUTE URLs.
- The invalid absolute URLs are caught by Joomla! and then tried to be parsed as SEF URLs
- Of course, they are not SEF URLs either and Joomla! throws a 403 Component Not Found error
- ADMIN TOOLS PROFESSIONAL HAS ABSOLUTELY NOTHING TO DO WITH THIS ISSUE AT ALL.

The structure of your old site is different. The calendar always displays on top level pages, where the base href address is 0 levels deep, e.g. http://www.example.com/somepage.html. This means that the relative URL used by the module is always correct. If you try to publish the calendar module to the blog pages and go inside a blog post's page, you'll see that the module will not work any more.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user29671
Thanks very much for your reply, Nicholas.

DidnΒ΄t mean to bother you at all, IΒ΄m sorry if I sounded too irrational.

I did get the point that ATP wasnΒ΄t the culprit at all (otherwise youΒ΄d have told me how to fix it, given the great support you always offer, no doubt about it).
What I was looking for, is something like the last paragraph you wrote. Of course with your detailed reply now I have a much better understanding of the whole process of how URLs work (and why the module fails), for which I thank you.

Great software and great support, thanx a lot.
Regards,

nicholas
Akeeba Staff
Manager
No worries! I know that most people don't realise how the browser parses the URLs you send to it or what is the difference between a/b/c.html and /a/b/c.html when referenced in a page at www.example.com/d/e/f.html. I'm glad you understand how the URL parsing process works now - that was my main objective when replying to this thread :)

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!