I've got problem with Popups when using it with Popups: Add and Reference.
When I'm clicking on 'Add some content' it generating the error:
Message: Unable to open: node/add/parent?
Link is: node/add/parent?destination=node/add/child
On admin it's working fine, but on user not.
User have permission to view this page and to create specified content type.
Probably because it's trying to open:
node/add/parent?&destination=node%2Fadd%2Fchild
?
'?&'
Following line in popups.js:
href = href.replace(/destination=[^;&]*[;&]?/, ''); // Strip out any existing destination param.
Converting this:
node/add/parent?destination=node/add/child
to this one:
node/add/parent?
Shouldn't be without question mark?
It can be related to redirection as well:
When I'm going to:
node/add/parent?destination=node%2Fadd%2Fchild"
I'm redirected to:
add/parent
Using path_redirect.
Redirection are supported?
Related issue: #358474: not able to open content
Comments
Comment #1
starbow commentedNot sure. There might be a conflict with path_redirect.
The next release on the 1.2 branch will have a switch to toggle off the destination rewriting.
Comment #2
andrewsuth commentedI'm using 1.3 now and can't see this implemented.
It's be very useful to get this functionality added as, without this, it makes Popups incompatabile with the useful Prepopulate module.
Comment #3
starbow commentedActually the new option did not make it into the 1,x branch. It now exists in the 2.x branch as, I think, hijackDestination, which defaults to true, but can be set to false. It needs testing, so please give it a try. You will need to use it with the doneTest options (the renamed forceReturn option, which can now take a regular expression), which also needs testing :) Check out the README.txt in the 2.x branch for more explanation.
Comment #4
andrewsuth commentedI'm now your guinea pig.. installed the latests 2.x branch.
I conducted tests in Chrome 1.0, Firefox 3.0 in conjunction with Popups: Add and Reference
Theme: Acquia
Popups settings selected: "Scan all pages for popup links" & "Automatically close final confirmation messages"
No skin: No popups icon but pops-up in both browsers.
Basic skin: Shows popups icon and pops-up in both browsers.
Blue skin: No popups icon but Pops-up in both browsers.
Facebook skin: No popups icon and pops-up in Chrome only (Firefox directs me to the normal view of the node).
I have also been using Popups in the template layer like this:
<?php print l('Request Venue', 'http://example.com/node/add/request-venue/6', array('attributes' => array('class' => 'popups'))); ?>And using other modules to control the displayed node:
- Prepopulate module works perfectly with "out-of-the-box" Popups. Tested for:
add/node/request-venue?edit[0][nid]=6.- Node Reference URL widget module works perfectly with "out-of-the-box" Popups. Tested for:
add/node/request-venue/6But it does not work in the above modules in Firefox using the "facebook" skin. That's expected as the Facebook skin seems to have issues with Firefox, as outlined above.
Another minor issue would be that I did not install the "Popups: Test Page" module but it still gave me the option to try and display a test page on the configuration screen - which of course failed.
Comment #5
mrgoltra commentedsubscribing.
Comment #6
rc2020 commentedI am also having a problem adding content with a group association with it. So when I create a link to add a popup with group association, it takes me to the 'add content' page (node/add), as if I entered a content type name improperly, as in if trying to add an 'event,' I typed node/add/eventt, as opposed to 'event.'
Here is my link:
$nid is the $nid I want the group post to be associated with, and normally thats how the group link is formatted. However, when put in a popup, the link does not function properly and takes me to the root node/add page. I think this is somehow related to the ? issues listed above.
Does anyone have any ideas?
Thanks!
Comment #7
elvis2 commentedI ran into this problem as well. The problem disappeared once I removed my print_r() and dpr() code within my hook_form_alter().
Comment #8
kenorb commentedDrupal 6 is no longer officially supported. If you think this issue is still relevant for 8.x, feel free to re-open.