Closed (fixed)
Project:
Simplenews Content Selection
Version:
6.x-1.5
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jun 2010 at 14:40 UTC
Updated:
20 Jul 2010 at 10:10 UTC
The Ajax code in the views integration uses
$.get('scs_views/nodeselected', 'nid=' + nodes, scs_ajax_return);
However, if the view used to select the newsletter isssues is not the site root, this will fail due to the relative path being used.
I.e. a view with the path admin/content/select_newsletter will result in the ajax request getting sent to "admin/content/select_newsletter/scs_views/nodeselected", a 404.
Instead,
$.get('/scs_views/nodeselected', 'nid=' + nodes, scs_ajax_return);
Should do the trick.
Comments
Comment #1
hsudhof commentedComment #2
dtrdewaele commentedIndeed.
I have discovered this issue too yesterday.
Issue will be fixed in the development release later this week.
Comment #3
dtrdewaele commentedComment #4
dtrdewaele commentedFix in this commit:
Commit #385820 by coworks_dieter at 17:46
Comment #5
jm.federico commentedGuys, big problem
We know about the problem with relative paths already.
The problem with absolute path is that we are assuming drupal is installed in the root directpry of the server, but if drupal path is something like
www.example.com/path/to/drupalthen the callback should be
www.example.com/path/to/drupal/scs_views/nodeselectedBut with the fix you gave it is
www.example.com/scs_views/nodeselectedthe solution is this:
$.get(Drupal.settings.basePath+'scs_views/nodeselected', 'nid=' + nodes, scs_ajax_return);Marking as critical because it renders the module unusable in such scenario.
Cheers
Comment #6
dtrdewaele commentedWill be added to the next commit.
Thx
Comment #7
dtrdewaele commentedJust commited this to CVS.
Will be available in next release.
Thx