Needs review
Project:
jQuery AJAX Load
Version:
7.x-1.4
Component:
Miscellaneous
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Oct 2014 at 20:04 UTC
Updated:
21 Jan 2016 at 18:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
hatuhay commentedMy suggestion is not to load the search form in a modal, but to render it as a block and hide it on a modal...
Comment #2
seehawk commentedThanks for the fast response. I appreciate the advice, but the bigger issue for me is that I can't get your module to work. No matter which page I set as the link target, I can't get it to open. As far as I can tell, I have the classes in the link set correctly. Can you confirm this? Is there a working example page you could point me to?
Also, does it make a difference that my site is in a subdirectory? I need to go through the code to see what's happening, but I'd like to at least be able to confirm that the module is supposed to work with the classes I'm using (I haven't changed the module's default configuration.)
Thanks!
Comment #3
hatuhay commentedHi there,
The jquery_ajax_load module comes with a test module.
You can start there.
The intallation being in on a sub-dir should not be a problem, but could.
Comment #4
seehawk commentedTried the test page, but was unable to get any page to load. Looking at the console, I'm getting page not found errors on calls to /jquery_ajax_load that are not including my subdirectory, so it looks like that's at least part of the problem.
I also hard-coded a modal inside a block just to confirm that it wasn't an issue with Bootstrap.
Changing this to a bug report with a new title to reflect the issue.
Comment #5
hatuhay commentedI do not have my computer on hand, so cannot check on code, but I am sure there is a previous issue that address same problem.
Please take a look on previous issues.
Comment #6
bverc commentedConfirmed the Twitter Bootstrap Modal module, but more specifically jqueary_ajax_load, does not work well (it does work though) with websites in a subdirectory.
Namely any link will generally be to
href="/sub_dir/node/####"where modal will only work whenhref="/node/####".In addition, the test module uses class: .jquery_ajax_load_TB, whereas the modal functionality needs .twitter_bootstrap_modal as the new default.
Comment #7
stringv commentedIs there a solution to this? I get an error for every page when the site is in a subdirectory, works fine when it's in the root. Unfortunately I need to use a subdirectory...
Comment #8
ahmedchebil commentedChanged the issue to major,
The module should use the Drupal paths
changed line 59 in jquery_ajax_load.js to : loading_html += Drupal.settings.basePath + module_path;
and 60 to : loading_html += '/jquery_ajax_load_loading.gif">';
Line 62 changed to $(target).load(Drupal.settings.basePath + 'jquery_ajax_load/get/' + url, function( response, status, xhr ) {
but url is still undefined
Comment #9
matias commentedHere is my attempt to fix this issue.
It worked ok on a site under a "/drupal/" directory and links like this:
<a href="/drupal/node/1" class="jquery_ajax_load">Test</a>Comment #10
matias commentedSory, I attached the wrong patch