I create a page view that returns nodes (in table format). I've added an edit link field. I have an exposed filter and AJAX is turned on. After filtering at least once, the destination for the edit link is http://mysite.local/node/9/edit?destination=views/ajax, so once I save the node, I get redirected to a page containing JSON, instead of the page that with the view.

Note: This seems to only happen under nginx and IIS, NOT with Apache.

CommentFileSizeAuthor
#71 views-ajax-nginx-1036962-71.patch490 bytesdsnopek
None View
#65 1036962-views-ajax-destination-65.patch1.02 KBwiifm
None View
#29 views-fix-destination-link-for-ajax-1036962-29.patch747 bytesgrahamC
PASSED: [[SimpleTest]]: [MySQL] 1,658 pass(es). View
#26 views-fix-destiantion-link-for-ajax-1036962-26.patch761 bytesmr.york
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch views-fix-destiantion-link-for-ajax-1036962-26.patch. Unable to apply patch. See the log in the details link for more information. View
#23 views-fix-destiantion-link-for-ajax-1036962-23.patch1.27 KBacbramley
PASSED: [[SimpleTest]]: [MySQL] 1,603 pass(es). View
#11 views-fix-destiantion-link-for-ajax-1036962-11.patch1.22 KBdas-peter
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch views-fix-destiantion-link-for-ajax-1036962-11.patch. Unable to apply patch. See the log in the details link for more information. View
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

craigmc’s picture

Also having an issue with edit link with AJAX enabled-- adds 22k character string to destination that causes error with my web server.

URL;

http://myserver.local/node/10/edit?destination=myPRs%3Fview_name%3Dmyprs%26view_display_id%3Dpage_1%26view_args%3D4%26view_path%3DmyPRs%26view_base_path%3DmyPRs%26view_dom_id%3D1%26pager_element%3D0%26ajax_html_ids%5B0%5D%3Dskip-link%26ajax_html_ids%5B1%5D%3Dpage-wrapper%26ajax_html_ids%5B2%5D%3Dpage%26ajax_html_ids%5B3%5D%3Dheader%26ajax_html_ids%5B4%5D%3Dlogo%26ajax_html_ids%5B5%5D%3Dname-and-slogan%26ajax_html_ids%5B6%5D%3Dsite-name%26ajax_html_ids%5B7%5D%3Dmain-menu%26ajax_html_ids%5B8%5D%3Dmain-menu-links%26ajax_html_ids%5B9%5D%3Dsecondary-menu%26ajax_html_ids%5B10%5D%3Dsecondary-menu-links%26ajax_html_ids%5B11%5D%3Dmain-wrapper%26ajax_html_ids%5B12%5D%3Dmain%26ajax_html_ids%5B13%5D%3Dbreadcrumb%26ajax_html_ids%5B14%5D%3Dsidebar-first%26ajax_html_ids%5B15%5D%3Dblock-search-form%26ajax_html_ids%5B16%5D%3Dsearch-block-form%26ajax_html_ids%5B17%5D%3Dedit-search-block-form--2%26ajax_html_ids%5B18%5D%3Dedit-actions%26ajax_html_ids%5B19%5D%3Dedit-submit%26ajax_html_ids%5B20%5D%3Dblock-system-navigation%26ajax_html_ids%5B21%5D%3Dcontent%26ajax_html_ids%5B22%5D%3Dmain-content%26ajax_html_ids%5B23%5D%3Dblock-system-main%26ajax_html_ids%5B24%5D%3Dviews-exposed-form-myprs-page-1%26ajax_html_ids%5B25%5D%3Dedit-exercise%26ajax_html_ids%5B26%5D%3Dedit-submit-myprs%26ajax_html_ids%5B27%5D%3Dfooter-wrapper%26ajax_html_ids%5B28%5D%3Dfooter%26ajax_html_ids%5B29%5D%3Dblock-system-powered-by%26ajax_html_ids%5B30%5D%3Dskip-link%26ajax_html_ids%5B31%5D%3Dpage-wrapper%26ajax_html_ids%5B32%5D%3Dpage%26ajax_html_ids%5B33%5D%3Dheader%26ajax_html_ids%5B34%5D%3Dlogo%26ajax_html_ids%5B35%5D%3Dname-and-slogan%26ajax_html_ids%5B36%5D%3Dsite-name%26ajax_html_ids%5B37%5D%3Dmain-menu%26ajax_html_ids%5B38%5D%3Dmain-menu-links%26ajax_html_ids%5B39%5D%3Dsecondary-menu%26ajax_html_ids%5B40%5D%3Dsecondary-menu-links%26ajax_html_ids%5B41%5D%3Dmain-wrapper%26ajax_html_ids%5B42%5D%3Dmain%26ajax_html_ids%5B43%5D%3Dbreadcrumb%26ajax_html_ids%5B44%5D%3Dsidebar-first%26ajax_html_ids%5B45%5D%3Dblock-search-form%26ajax_html_ids%5B46%5D%3Dsearch-block-form%26ajax_html_ids%5B47%5D%3Dedit-search-block-form--2%26ajax_html_ids%5B48%5D%3Dedit-actions%26ajax_html_ids%5B49%5D%3Dedit-submit%26ajax_html_ids%5B50%5D%3Dblock-system-navigation%26ajax_html_ids%5B51%5D%3Dcontent%26ajax_html_ids%5B52%5D%3Dmain-content%26ajax_html_ids%5B53%5D%3Dblock-system-main%26ajax_html_ids%5B54%5D%3Dviews-exposed-form-myprs-page-1%26ajax_html_ids%5B55%5D%3Dedit-exercise--2%26ajax_html_ids%5B56%5D%3Dedit-submit-myprs--2%26ajax_html_ids%5B57%5D%3Dfooter-wrapper%26ajax_html_ids%5B58%5D%3Dfooter%26ajax_html_ids%5B59%5D%3Dblock-system-powered-by%26ajax_html_ids%5B60%5D%3Dskip-link%26ajax_html_ids%5B61%5D%3Dpage-wrapper%26ajax_html_ids%5B62%5D%3Dpage%26ajax_html_ids%5B63%5D%3Dheader%26ajax_html_ids%5B64%5D%3Dlogo%26ajax_html_ids%5B65%5D%3Dname-and-slogan%26ajax_html_ids%5B66%5D%3Dsite-name%26ajax_html_ids%5B67%5D%3Dmain-menu%26ajax_html_ids%5B68%5D%3Dmain-menu-links%26ajax_html_ids%5B69%5D%3Dsecondary-menu%26ajax_html_ids%5B70%5D%3Dsecondary-menu-links%26ajax_html_ids%5B71%5D%3Dmain-wrapper%26ajax_html_ids%5B72%5D%3Dmain%26ajax_html_ids%5B73%5D%3Dbreadcrumb%26ajax_html_ids%5B74%5D%3Dsidebar-first%26ajax_html_ids%5B75%5D%3Dblock-search-form%26ajax_html_ids%5B76%5D%3Dsearch-block-form%26ajax_html_ids%5B77%5D%3Dedit-search-block-form--2%26ajax_html_ids%5B78%5D%3Dedit-actions%26ajax_html_ids%5B79%5D%3Dedit-submit%26ajax_html_ids%5B80%5D%3Dblock-system-navigation%26ajax_html_ids%5B81%5D%3Dcontent%26ajax_html_ids%5B82%5D%3Dmain-content%26ajax_html_ids%5B83%5D%3Dblock-system-main%26ajax_html_ids%5B84%5D%3Dviews-exposed-form-myprs-page-1%26ajax_html_ids%5B85%5D%3Dedit-exercise--3%26ajax_html_ids%5B86%5D%3Dedit-submit-myprs--3%26ajax_html_ids%5B87%5D%3Dfooter-wrapper%26ajax_html_ids%5B88%5D%3Dfooter%26ajax_html_ids%5B89%5D%3Dblock-system-powered-by%26ajax_html_ids%5B90%5D%3Dskip-link%26ajax_html_ids%5B91%5D%3Dpage-wrapper%26ajax_html_ids%5B92%5D%3Dpage%26ajax_html_ids%5B93%5D%3Dheader%26ajax_html_ids%5B94%5D%3Dlogo%26ajax_html_ids%5B95%5D%3Dname-and-slogan%26ajax_html_ids%5B96%5D%3Dsite-name%26ajax_html_ids%5B97%5D%3Dmain-menu%26ajax_html_ids%5B98%5D%3Dmain-menu-links%26ajax_html_ids%5B99%5D%3Dsecondary-menu%26ajax_html_ids%5B100%5D%3Dsecondary-menu-links%26ajax_html_ids%5B101%5D%3Dmain-wrapper%26ajax_html_ids%5B102%5D%3Dmain%26ajax_html_ids%5B103%5D%3Dbreadcrumb%26ajax_html_ids%5B104%5D%3Dsidebar-first%26ajax_html_ids%5B105%5D%3Dblock-search-form%26ajax_html_ids%5B106%5D%3Dsearch-block-form%26ajax_html_ids%5B107%5D%3Dedit-search-block-form--2%26ajax_html_ids%5B108%5D%3Dedit-actions%26ajax_html_ids%5B109%5D%3Dedit-submit%26ajax_html_ids%5B110%5D%3Dblock-system-navigation%26ajax_html_ids%5B111%5D%3Dcontent%26ajax_html_ids%5B112%5D%3Dmain-content%26ajax_html_ids%5B113%5D%3Dblock-system-main%26ajax_html_ids%5B114%5D%3Dviews-exposed-form-myprs-page-1%26ajax_html_ids%5B115%5D%3Dedit-exercise--4%26ajax_html_ids%5B116%5D%3Dedit-submit-myprs--4%26ajax_html_ids%5B117%5D%3Dfooter-wrapper%26ajax_html_ids%5B118%5D%3Dfooter%26ajax_html_ids%5B119%5D%3Dblock-system-powered-by%26ajax_html_ids%5B120%5D%3Dskip-link%26ajax_html_ids%5B121%5D%3Dpage-wrapper%26ajax_html_ids%5B122%5D%3Dpage%26ajax_html_ids%5B123%5D%3Dheader%26ajax_html_ids%5B124%5D%3Dlogo%26ajax_html_ids%5B125%5D%3Dname-and-slogan%26ajax_html_ids%5B126%5D%3Dsite-name%26ajax_html_ids%5B127%5D%3Dmain-menu%26ajax_html_ids%5B128%5D%3Dmain-menu-links%26ajax_html_ids%5B129%5D%3Dsecondary-menu%26ajax_html_ids%5B130%5D%3Dsecondary-menu-links%26ajax_html_ids%5B131%5D%3Dmain-wrapper%26ajax_html_ids%5B132%5D%3Dmain%26ajax_html_ids%5B133%5D%3Dbreadcrumb%26ajax_html_ids%5B134%5D%3Dsidebar-first%26ajax_html_ids%5B135%5D%3Dblock-search-form%26ajax_html_ids%5B136%5D%3Dsearch-block-form%26ajax_html_ids%5B137%5D%3Dedit-search-block-form--2%26ajax_html_ids%5B138%5D%3Dedit-actions%26ajax_html_ids%5B139%5D%3Dedit-submit%26ajax_html_ids%5B140%5D%3Dblock-system-navigation%26ajax_html_ids%5B141%5D%3Dcontent%26ajax_html_ids%5B142%5D%3Dmain-content%26ajax_html_ids%5B143%5D%3Dblock-system-main%26ajax_html_ids%5B144%5D%3Dviews-exposed-form-myprs-page-1%26ajax_html_ids%5B145%5D%3Dedit-exercise--5%26ajax_html_ids%5B146%5D%3Dedit-submit-myprs--5%26ajax_html_ids%5B147%5D%3Dfooter-wrapper%26ajax_html_ids%5B148%5D%3Dfooter%26ajax_html_ids%5B149%5D%3Dblock-system-powered-by%26ajax_html_ids%5B150%5D%3Dskip-link%26ajax_html_ids%5B151%5D%3Dpage-wrapper%26ajax_html_ids%5B152%5D%3Dpage%26ajax_html_ids%5B153%5D%3Dheader%26ajax_html_ids%5B154%5D%3Dlogo%26ajax_html_ids%5B155%5D%3Dname-and-slogan%26ajax_html_ids%5B156%5D%3Dsite-name%26ajax_html_ids%5B157%5D%3Dmain-menu%26ajax_html_ids%5B158%5D%3Dmain-menu-links%26ajax_html_ids%5B159%5D%3Dsecondary-menu%26ajax_html_ids%5B160%5D%3Dsecondary-menu-links%26ajax_html_ids%5B161%5D%3Dmain-wrapper%26ajax_html_ids%5B162%5D%3Dmain%26ajax_html_ids%5B163%5D%3Dbreadcrumb%26ajax_html_ids%5B164%5D%3Dsidebar-first%26ajax_html_ids%5B165%5D%3Dblock-search-form%26ajax_html_ids%5B166%5D%3Dsearch-block-form%26ajax_html_ids%5B167%5D%3Dedit-search-block-form--2%26ajax_html_ids%5B168%5D%3Dedit-actions%26ajax_html_ids%5B169%5D%3Dedit-submit%26ajax_html_ids%5B170%5D%3Dblock-system-navigation%26ajax_html_ids%5B171%5D%3Dcontent%26ajax_html_ids%5B172%5D%3Dmain-content%26ajax_html_ids%5B173%5D%3Dblock-system-main%26ajax_html_ids%5B174%5D%3Dviews-exposed-form-myprs-page-1%26ajax_html_ids%5B175%5D%3Dedit-exercise--6%26ajax_html_ids%5B176%5D%3Dedit-submit-myprs--6%26ajax_html_ids%5B177%5D%3Dfooter-wrapper%26ajax_html_ids%5B178%5D%3Dfooter%26ajax_html_ids%5B179%5D%3Dblock-system-powered-by%26ajax_html_ids%5B180%5D%3Dskip-link%26ajax_html_ids%5B181%5D%3Dpage-wrapper%26ajax_html_ids%5B182%5D%3Dpage%26ajax_html_ids%5B183%5D%3Dheader%26ajax_html_ids%5B184%5D%3Dlogo%26ajax_html_ids%5B185%5D%3Dname-and-slogan%26ajax_html_ids%5B186%5D%3Dsite-name%26ajax_html_ids%5B187%5D%3Dmain-menu%26ajax_html_ids%5B188%5D%3Dmain-menu-links%26ajax_html_ids%5B189%5D%3Dsecondary-menu%26ajax_html_ids%5B190%5D%3Dsecondary-menu-links%26ajax_html_ids%5B191%5D%3Dmain-wrapper%26ajax_html_ids%5B192%5D%3Dmain%26ajax_html_ids%5B193%5D%3Dbreadcrumb%26ajax_html_ids%5B194%5D%3Dsidebar-first%26ajax_html_ids%5B195%5D%3Dblock-search-form%26ajax_html_ids%5B196%5D%3Dsearch-block-form%26ajax_html_ids%5B197%5D%3Dedit-search-block-form--2%26ajax_html_ids%5B198%5D%3Dedit-actions%26ajax_html_ids%5B199%5D%3Dedit-submit%26ajax_html_ids%5B200%5D%3Dblock-system-navigation%26ajax_html_ids%5B201%5D%3Dcontent%26ajax_html_ids%5B202%5D%3Dmain-content%26ajax_html_ids%5B203%5D%3Dblock-system-main%26ajax_html_ids%5B204%5D%3Dviews-exposed-form-myprs-page-1%26ajax_html_ids%5B205%5D%3Dedit-exercise--7%26ajax_html_ids%5B206%5D%3Dedit-submit-myprs--7%26ajax_html_ids%5B207%5D%3Dfooter-wrapper%26ajax_html_ids%5B208%5D%3Dfooter%26ajax_html_ids%5B209%5D%3Dblock-system-powered-by%26ajax_page_state%5Btheme%5D%3Dbartik%26ajax_page_state%5Btheme_token%5D%3Dmxu1Nm2FF66bPF7lvmEesSx9Lr0Zse6a2IxkokY1eeI%26ajax_page_state%5Bcss%5D%5Bmodules%252525252525252Fsystem%252525252525252Fsystem.base.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%252525252525252Fsystem%252525252525252Fsystem.menus.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%252525252525252Fsystem%252525252525252Fsystem.messages.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%252525252525252Fsystem%252525252525252Fsystem.theme.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%252525252525252Fcomment%252525252525252Fcomment.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%252525252525252Ffield%252525252525252Ftheme%252525252525252Ffield.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%252525252525252Fnode%252525252525252Fnode.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%252525252525252Fsearch%252525252525252Fsearch.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%252525252525252Fuser%252525252525252Fuser.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bsites%252525252525252Fall%252525252525252Fmodules%252525252525252Fctools%252525252525252Fcss%252525252525252Fctools.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bsites%252525252525252Fall%252525252525252Fmodules%252525252525252Fdate%252525252525252Fdate_popup%252525252525252Fthemes%252525252525252Fdatepicker.1.7.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bsites%252525252525252Fall%252525252525252Fmodules%252525252525252Fviews%252525252525252Fcss%252525252525252Fviews.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bsites%252525252525252Fall%252525252525252Fmodules%252525252525252Fdate%252525252525252Fdate.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%252525252525252Fbartik%252525252525252Fcss%252525252525252Flayout.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%252525252525252Fbartik%252525252525252Fcss%252525252525252Fstyle.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%252525252525252Fbartik%252525252525252Fcss%252525252525252Fcolors.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%252525252525252Fbartik%252525252525252Fcss%252525252525252Fprint.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%252525252525252Fbartik%252525252525252Fcss%252525252525252Fie.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%252525252525252Fbartik%252525252525252Fcss%252525252525252Fie6.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%25252525252Fsystem%25252525252Fsystem.base.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%25252525252Fsystem%25252525252Fsystem.menus.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%25252525252Fsystem%25252525252Fsystem.messages.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%25252525252Fsystem%25252525252Fsystem.theme.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%25252525252Fcomment%25252525252Fcomment.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%25252525252Ffield%25252525252Ftheme%25252525252Ffield.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%25252525252Fnode%25252525252Fnode.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%25252525252Fsearch%25252525252Fsearch.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%25252525252Fuser%25252525252Fuser.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bsites%25252525252Fall%25252525252Fmodules%25252525252Fctools%25252525252Fcss%25252525252Fctools.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bsites%25252525252Fall%25252525252Fmodules%25252525252Fdate%25252525252Fdate_popup%25252525252Fthemes%25252525252Fdatepicker.1.7.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bsites%25252525252Fall%25252525252Fmodules%25252525252Fviews%25252525252Fcss%25252525252Fviews.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bsites%25252525252Fall%25252525252Fmodules%25252525252Fdate%25252525252Fdate.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%25252525252Fbartik%25252525252Fcss%25252525252Flayout.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%25252525252Fbartik%25252525252Fcss%25252525252Fstyle.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%25252525252Fbartik%25252525252Fcss%25252525252Fcolors.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%25252525252Fbartik%25252525252Fcss%25252525252Fprint.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%2525252Fsystem%2525252Fsystem.base.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%2525252Fsystem%2525252Fsystem.menus.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%2525252Fsystem%2525252Fsystem.messages.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%2525252Fsystem%2525252Fsystem.theme.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%2525252Fcomment%2525252Fcomment.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%2525252Ffield%2525252Ftheme%2525252Ffield.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%2525252Fnode%2525252Fnode.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%2525252Fsearch%2525252Fsearch.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%2525252Fuser%2525252Fuser.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bsites%2525252Fall%2525252Fmodules%2525252Fctools%2525252Fcss%2525252Fctools.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bsites%2525252Fall%2525252Fmodules%2525252Fdate%2525252Fdate_popup%2525252Fthemes%2525252Fdatepicker.1.7.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bsites%2525252Fall%2525252Fmodules%2525252Fviews%2525252Fcss%2525252Fviews.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bsites%2525252Fall%2525252Fmodules%2525252Fdate%2525252Fdate.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%2525252Fbartik%2525252Fcss%2525252Flayout.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%2525252Fbartik%2525252Fcss%2525252Fstyle.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%2525252Fbartik%2525252Fcss%2525252Fcolors.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%2525252Fbartik%2525252Fcss%2525252Fprint.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%252Fsystem%252Fsystem.base.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%252Fsystem%252Fsystem.menus.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%252Fsystem%252Fsystem.messages.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%252Fsystem%252Fsystem.theme.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%252Fcomment%252Fcomment.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%252Ffield%252Ftheme%252Ffield.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%252Fnode%252Fnode.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%252Fsearch%252Fsearch.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bmodules%252Fuser%252Fuser.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bsites%252Fall%252Fmodules%252Fctools%252Fcss%252Fctools.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bsites%252Fall%252Fmodules%252Fdate%252Fdate_popup%252Fthemes%252Fdatepicker.1.7.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bsites%252Fall%252Fmodules%252Fviews%252Fcss%252Fviews.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bsites%252Fall%252Fmodules%252Fdate%252Fdate.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%252Fbartik%252Fcss%252Flayout.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%252Fbartik%252Fcss%252Fstyle.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%252Fbartik%252Fcss%252Fcolors.css%5D%3D1%26ajax_page_state%5Bcss%5D%5Bthemes%252Fbartik%252Fcss%252Fprint.css%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252525252525252Fjquery.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252525252525252Fjquery.once.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252525252525252Fdrupal.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252525252525252Fjquery.cookie.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252525252525252Fjquery.form.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252525252525252Fajax.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%252525252525252Fall%252525252525252Fmodules%252525252525252Fadmin_menu%252525252525252Fadmin_devel%252525252525252Fadmin_devel.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%252525252525252Fall%252525252525252Fmodules%252525252525252Fviews%252525252525252Fjs%252525252525252Fbase.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252525252525252Fprogress.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%252525252525252Fall%252525252525252Fmodules%252525252525252Fviews%252525252525252Fjs%252525252525252Fajax_view.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%2525252525252Fjquery.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%2525252525252Fjquery.once.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%2525252525252Fdrupal.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%2525252525252Fjquery.cookie.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%2525252525252Fjquery.form.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%2525252525252Fajax.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%2525252525252Fall%2525252525252Fmodules%2525252525252Fadmin_menu%2525252525252Fadmin_devel%2525252525252Fadmin_devel.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%2525252525252Fall%2525252525252Fmodules%2525252525252Fviews%2525252525252Fjs%2525252525252Fbase.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%2525252525252Fprogress.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%2525252525252Fall%2525252525252Fmodules%2525252525252Fviews%2525252525252Fjs%2525252525252Fajax_view.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%25252525252Fjquery.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%25252525252Fjquery.once.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%25252525252Fdrupal.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%25252525252Fjquery.cookie.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%25252525252Fjquery.form.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%25252525252Fajax.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%25252525252Fall%25252525252Fmodules%25252525252Fadmin_menu%25252525252Fadmin_devel%25252525252Fadmin_devel.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%25252525252Fall%25252525252Fmodules%25252525252Fviews%25252525252Fjs%25252525252Fbase.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%25252525252Fprogress.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%25252525252Fall%25252525252Fmodules%25252525252Fviews%25252525252Fjs%25252525252Fajax_view.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252525252Fjquery.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252525252Fjquery.once.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252525252Fdrupal.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252525252Fjquery.cookie.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252525252Fjquery.form.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252525252Fajax.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%252525252Fall%252525252Fmodules%252525252Fadmin_menu%252525252Fadmin_devel%252525252Fadmin_devel.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%252525252Fall%252525252Fmodules%252525252Fviews%252525252Fjs%252525252Fbase.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252525252Fprogress.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%252525252Fall%252525252Fmodules%252525252Fviews%252525252Fjs%252525252Fajax_view.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%2525252Fjquery.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%2525252Fjquery.once.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%2525252Fdrupal.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%2525252Fjquery.cookie.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%2525252Fjquery.form.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%2525252Fajax.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%2525252Fall%2525252Fmodules%2525252Fadmin_menu%2525252Fadmin_devel%2525252Fadmin_devel.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%2525252Fall%2525252Fmodules%2525252Fviews%2525252Fjs%2525252Fbase.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%2525252Fprogress.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%2525252Fall%2525252Fmodules%2525252Fviews%2525252Fjs%2525252Fajax_view.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%25252Fjquery.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%25252Fjquery.once.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%25252Fdrupal.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%25252Fjquery.cookie.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%25252Fjquery.form.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%25252Fajax.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%25252Fall%25252Fmodules%25252Fadmin_menu%25252Fadmin_devel%25252Fadmin_devel.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%25252Fall%25252Fmodules%25252Fviews%25252Fjs%25252Fbase.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%25252Fprogress.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%25252Fall%25252Fmodules%25252Fviews%25252Fjs%25252Fajax_view.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252Fjquery.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252Fjquery.once.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252Fdrupal.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252Fjquery.cookie.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252Fjquery.form.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252Fajax.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%252Fall%252Fmodules%252Fadmin_menu%252Fadmin_devel%252Fadmin_devel.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%252Fall%252Fmodules%252Fviews%252Fjs%252Fbase.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bmisc%252Fprogress.js%5D%3D1%26ajax_page_state%5Bjs%5D%5Bsites%252Fall%252Fmodules%252Fviews%252Fjs%252Fajax_view.js%5D%3D1%26order%3Dentity_id_3%26sort%3Dasc
dawehner’s picture

In theory the field handler would have to use something like $view->get_path() instead of drupal_get_destination().

I'm not sure whether this might open other bugs.

chadcf’s picture

I'm having the same issue with 6.x-2.12. I've created a dashboard of sorts for admin's to keep on top of new content, and have several views in quicktabs. All the views are ajax enabled for nice pagination, but the link to edit the view sets the destination to views/ajax. When the user's use the link to edit a node, after hitting save they just get some json content on a blank screen.

dawehner’s picture

Perhaps this patch helps you: http://drupal.org/node/956186 but it was created based on a views issue.

iamjon’s picture

Status: Active » Closed (works as designed)

Closing from a lack of activity.

apmsooner’s picture

Status: Closed (works as designed) » Active

I'm reopening this issue because it persists and can't imagine works as designed. The edit path for ajax enabled view is: destination=views/ajax which makes page try to open an ajax file upon saving the record. Was there some sort of patch for this or a fix in the dev version?

dawehner’s picture

Does someone know whether there is an easy way to get the original url in an ajax request?

geerlingguy’s picture

Subscribe, and to dereine, I'm not sure. This bug only affects one admin facing page on my site, so it's not a huge issue for me, but it would be fine with me if no destination was set at all, for my purposes.

josebrito’s picture

I subscribe this post because I have the same problem.
I'd like to know how to get the original url to rewrite the "Edit" link.

Toongenius’s picture

Same issue. Subscribing

das-peter’s picture

Status: Active » Needs review
Issue tags: +dvcs11
FileSize
1.22 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch views-fix-destiantion-link-for-ajax-1036962-11.patch. Unable to apply patch. See the log in the details link for more information. View

Same issue here - it's somewhat annoying if you use admin_views and saving a node sends you an ajax output :D
The idea I've had was to ensure drupal_get_destination() sends an appropriate destination. To do so I inject a custom value into the static cache of the function in views_ajax().
I'm not sure if this approach has nasty side-effects - at least it seems to work in my vbo case.

dawehner’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
Status: Needs review » Patch (to be ported)

This patch looks fine. Committed to 7.x-3.x and maybe needs a backport

das-peter’s picture

Awesome thanks!

timofey’s picture

Version: 6.x-3.x-dev » 7.x-3.3

I am still having the same issue.

After using Ajax to sort columns, my links look like this:

http://mysite.com/node/555/edit?destination=content/aaa?order=field_min_cat_reference&sort=desc&SESS15903623b6f15e5251aa23535a3369d6=yO6Kgjdk8GIIO0OIsiiQe_N3ZCXmIBVpvKDGssmSXy8&SESSc8bs72943bc0ace60394d2d2804f4a26=1f7203034b2633804c07f7d8e73fe9a4&SESSbdfda35783e20c59510c085ddefb0784=64bd7a46f1185ca928f14431sebcdad5&__unam=3cb9d7a-12680c96942-342d3fd5-166&Drupal_tableDrag_showWeight=0&__utma=233812797.1535232275.1312595099.1534629601.1334834372.15&__utmb=331862797.1.10.1344804372&__utmc=233862797&__utmz=231862797.1334055455.8.2.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not provided)&__utmv=231132797.authenticated user,Moderate Front SlideShow,Moderate Foot Banner,Moderate Videos,Moderate Upcoming Events&has_js=1

destination should end at "content/aaa"

I'm using the 7.x-3.3 (2012-Feb-22 release). I can also see that it's patched with #11.... but it's not working.

dawehner’s picture

Version: 7.x-3.3 » 6.x-3.x-dev

Let's move the issue back as your comment is quite unrelated.

You seems to have enabled session ID via URL, i'm pretty sure this a wrong server configuration.
Additional this issue is only about edit links of nodes...

ddrozdik’s picture

Same issue happens when I use filters(views 7.x-3.3).
Link looks as
http://mysite.com/node/1073/edit?destination=admin/dashboard/content%3Fq%3Dviews/ajax%26nid%3D%26type%5B0%5D%3Dnews%26title%3D%26status%3D0%26premium%3DAll%26uid%3D%26date_filter%5Bmin%5D%5Bdate%5D%3D%26date_filter%5Bmax%5D%5Bdate%5D%3D

On my local machine works fine but on dev server doesn't work.(strange)

ddrozdik’s picture

Problem was in config of ngnix, need to correct configure mod_rewrite for sites on drupal 7, because they have some differences from drupal 6.

dazz’s picture

and what is this correct configuration?

acbramley’s picture

Getting this problem too on Views 7.x-3.3 with an admin page of users with exposed filters and edit links. After clicking the edit link on a filtered page, editing a user, and clicking save, I'm redirected to /views/ajax?field_user_fname_value=Adam&field_user_lname_value=&status=All&rid=All&field_access_control_tid=All

mojiro’s picture

I also use nginx. Could you please post your new configuration ?

MustangGB’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Component: table style » Code
Status: Patch (to be ported) » Needs work

Changing #11 to following fixed it for me (CNW because I haven't rolled a patch):

// Overwrite the destination.
// @see drupal_get_destination()
$origin_destination = $path;
$query = $_REQUEST;
unset($query['q']);
$query_string = drupal_http_build_query($query);
if ($query_string != '') {
  $origin_destination .= '?' . $query_string;
}
$destination = &drupal_static('drupal_get_destination');
$destination = array('destination' => $origin_destination);
acbramley’s picture

#11 didn't fix the issue for me, #21 did though :) thanks a lot

acbramley’s picture

FileSize
1.27 KB
PASSED: [[SimpleTest]]: [MySQL] 1,603 pass(es). View

Here's a patch rolled off 7.x-3.x from the changes in #21

acbramley’s picture

Ah the problem here is though when you return to the destination with the query parameters, ajax filtering/sorting etc no longer works

grahamC’s picture

The filtering isn't working because the $_GET += $_POST;
line does not overwrite existing keys in $_GET with the new $_POST values.

Change that to $_GET = array_merge($_GET, $_POST); and it works again.

edit: Oh, nevermind, that's already fixed if you're using the current release of Views.

(I'm wondering whether query parameters should even be necessary if the user has an active $_SESSION...? - Views saves/loads status of the filters there anyway.)

mr.york’s picture

FileSize
761 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch views-fix-destiantion-link-for-ajax-1036962-26.patch. Unable to apply patch. See the log in the details link for more information. View

The filtering isn't working because the $_GET += $_POST;
I removed this modification.

mr.york’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, views-fix-destiantion-link-for-ajax-1036962-26.patch, failed testing.

grahamC’s picture

Status: Needs work » Needs review
FileSize
747 bytes
PASSED: [[SimpleTest]]: [MySQL] 1,658 pass(es). View

So, _another_ attempt at creating a patch from #21 then...

Funksmaname’s picture

Thank you! This patch seems to have fixed the nasty error I was getting in views with ajax enabled...

seanbfuller’s picture

This patch worked great to fix the critical issue for us of hitting the ajax page after editing a node. We did find one minor nit that came out of it, however: If you are paginated in beyond the first page of results, you get a page=x argument in the url when you come back after editing. This makes it impossible to get to back to the first page using the pager. Looks like this is because the url value overrides the non-existent value in the pagination link.

Steps to reproduce:

  1. Create a view of nodes with ajax pagination that has a few pages of results.
  2. Paginate to the third page of results.
  3. Click edit (either from an edit link or contextual links) one an item to go to the node edit page.
  4. Save the node and you should come back to the view page, on that same result page. Notice that you should have a page=2 in the url.
  5. Try to go to the first page of results and you'll just keep reloading the third page of results. If you paginate to any other page, it works.

Again, I'm not sure that this minor item is worth holding up the larger fix. This also might be more of an issue with pagination. A "page=0" parameter on the link would fix this. Not sure if that's worth splitting out to a new issue. Beyond that, the patch worked and fixed the critical issue so thanks.

mstef’s picture

Patch #23&29 do not resolve the issue for me.

This is the link to the edit form after submitting the filter via AJAX: http://localhost/node/23/edit?destination=admin/workbench/content/my%3Ft...

After submitting, I'm redirected to: http://localhost/admin/workbench/content/my?title=6timestamp%5Bmin%5D%3D...

Which is incorrect because now title=(the entire remaining URL), so it all gets sent into the title filter.

mstef’s picture

Status: Needs review » Needs work

Perhaps that's a separate issue entirely?

mstef’s picture

Status: Needs work » Needs review

Sorry, it appears my bug is unrelated. Forgot what I said..

mxwright’s picture

Thanks! This seems to fix a long-outstanding issue for us.

RogerRogers’s picture

Just wanted to chime in that this patch works for us. We have had to use on multiple sites. Will this get included in the main branch?

John Bickar’s picture

Status: Needs review » Reviewed & tested by the community

Tested the patch in #29 and it resolves the issue for me.

jlporter’s picture

#29 fixed our issue which was in the views_admin module, applied to 3.7 cleanly with a patch -p1 (got something weird with p0).

related admin_views issue that was fixed by this patch: https://drupal.org/node/1650420

mErilainen’s picture

#29 worked for us also, not using views_admin. Experienced it only on our development server, which is Nginx. Local apache environments didn't have any problems. I know, they should be identical, but life is life :)

westie’s picture

#29 worked for me, again on nginx. Please can this be committed?

torpy’s picture

Chiming in with another "it works for me!", this time on IIS 7.5 and IIS 8.

moonray’s picture

#29 worked to fix the problem on Pantheon (nginx server).
Like #39 said, local apache based environment isn't affected by this bug.

#31 indicated there is still a small problem that needs to be solved, but we should probably try to fix that in a follow-up patch since the critical issue is solved by the patch in #29.

MustangGB’s picture

Priority: Normal » Major
Issue summary: View changes

Although I'm the original "patch" creator I recently applied this to a new site and it's still working fine.

Bumping to major for a bit of attention and it's quite an important fix for people using the AJAX feature.

dawehner’s picture

It would be great to merge some of the comments and move this to the issue summary. This helps people to understand what is going on.
One requirement about the patch: Could we add some comment why we exactly need to unset $query['q']?

enzipher’s picture

Does the issue mentioned in #31 get any love here? If not it would be better to put that one as a separate issue.

seanr’s picture

I agree with #45 - please at least get this into views since it's working for folks, then we can address that one separately (unless someone's got a patch that fixes #31 now too).

CLEE25’s picture

Add me to the group of people who finally found a fix with #29. This was a problem across many sites, and was incredibly annoying since it never seemed to happen all the time. Only when I was demo-ing for clients.

#29 fixed it like a dream.

arosboro’s picture

Can anyone else confirm that patch 29 does not introduce issues with bulk operations? I am finding that when I try to delete multiple pieces of content that the page just refreshes with no action taken.

arosboro’s picture

I did some more testing. Caching was enabled which was causing the problems that I experienced. That is "works as designed" as far as I am concerned. I believe #29 successfully remedies 'views/ajax' being included in the destination parameter.

gmclelland’s picture

The patch in #29 worked for me. In my case after I clicked the "Edit" link at admin/content/file and then edited and saved the file, I would be shown a bunch of json.

After patching with #29 on the latest Views module, editing files works as expected.

MustangGB’s picture

Any chance to get this committed?

aaronbauman’s picture

#29 RTBC++

jdcollier’s picture

Impertinent question ...

It seems this isn't in the dev or stable branches still. Is this due to a [very] understandable workload issue on the dev team, or is there a concern with this patch that I'm not seeing?

Every time I install this patch, then a Views security update comes out and wipes it out :(

I appreciate the work ... I'm honestly wondering if I'm missing something on this one.

Thank you so much!

JD

davej’s picture

#29 resolved the problem here, with Views 7.x-3.8 under nginx.

Without the patch, the edit link URL from Views URL /group was:
/node/672/edit?destination=og%3Fq%3Dviews/ajax%26field_group_type_value%3DAll%26page%3D1
which, after saving the node, resolved to:
/views/ajax?field_group_type_value=All&page=1
which presented the user with some JSON.

With the patch, the edit link URL from Views URL /group is:
/node/672/edit?destination=og%3Ffield_group_type_value%3DAll%26page%3D1
which, after saving the node, resolved to:
/group?field_group_type_value=All&page=1

I agree with #31 that there is an issue with pagination after returning from the edit, also agree that this is a minor issue compared to the main issue.

Cheers,

Dave

djschoone’s picture

#29 works for me too! Thnx.

westberliner’s picture

Got an similar Issue with admin_views and nginx. #29 solved this.

dafeder’s picture

#29 worked for me on pantheon. Commit it!

lukus’s picture

This is working for me also.

Any idea when this will be committed?

Thanks

L

JKingsnorth’s picture

Duplicate issue here: #2188829: Error when creating new user if the user listing has more then one page - the RTBC patch in #29 also fixes that, so it would be great to get this in Views as it is obviously still a problem!

JKingsnorth’s picture

The 'broken pager' issue described in #31 and since is actually a separate issue that is being worked on here: #1786524: AJAX pager does not work if page number set in URL - so I don't think it should impede the progress of this patch.

labboy0276’s picture

Thank You, I can confirm #29 works as well. This problem has been around for so long, I just became accustomed to it....

parisek’s picture

I can confirm too that #29 patch worked and problem solved. Patch is ready for 2 years why is not committed?

wiifm’s picture

So this is a major issue, and it is effecting a major module in admin_views (with 54k installs and counting).

Steps to reproduce:

  1. Install admin_views
  2. Visit /admin/content
  3. Sort a column (uses AJAX)
  4. Click 'edit' on any piece of content
  5. Click 'save'

Expected behavior:

Returned to the content admin screen with the sort maintained, and a message saying 'saved'

Actual behavior:

Sent instead to /views/ajax/and JSON is presented on the screen confusing all content authors.

Example edit link (before patch):

Note the q=views/ajax in the destination:

/node/19/edit?destination=admin/content%3Fq%3Dviews/ajax%26type%3Dtlms_partner%26status%3DAll%26vid%3DAll%26order%3Dtitle%26sort%3Dasc

Example edit link (after patch):

/node/19/edit?destination=admin/content%3Ftype%3Dtlms_partner%26status%3DAll%26vid%3DAll%26order%3Dtitle%26sort%3Dasc

Patch at #29 fixes this (running against views 3.x), and looks like it has for everyone else here. Intrigued as to why this has not got the maintainers attention by now?

RTBC +1

wiifm’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
1.02 KB
None View

Had a discussion with @dawehner on IRC, Daniel suggested to improve the documentation of the patch as to why it is actively unsetting $_GET['q'].

Attached is a new patch that does this (no code changes).

ChrisFlink’s picture

Status: Needs review » Reviewed & tested by the community

Tested the latest patch by wiifm on the latest dev version of views. Comment makes sense. Patch seems to work fine and the issue when json is displayed instead of a page is gone. Since the last change to the patch only updated the comment and patch in #29 was successfully tested too, I'd say commit asap because this is a major issue with a solution laying around for over two years.

acbramley’s picture

Confirming this only seems to be an issue on Nginx configurations, using a local apache instance I couldn't reproduce the problem but could on our staging site running on nginx. After applying the patch the issue was fixed!

Fabianx’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/includes/ajax.inc
@@ -50,12 +50,17 @@ function views_ajax() {
-        $origin_destination .= '?' . $query;
+      $query = $_REQUEST;
+      unset($query['q']);

Why are we using $_REQUEST when just above we set $_GET to be $_POST and $_GET.

If we want the original vars without what was posted, we need to save the var before the

$_GET = $_GET + $_POST

If we want the combination of $_GET and $_POST, we can directly use $_GET in the first place as we just combined them ourselves.

I believe this wants to have the original $_GET instead ...

UPDATE:

It seems this wants to replace drupal_get_destination(), which is statically cached.

That is okay, but it should probably use the same functions:

- https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_...

   // ...
   $query = drupal_http_build_query(drupal_get_query_parameters());
    if ($query != '') {
      $path .= '?' . $query;
    }
douggreen’s picture

Given how long this took to get committed (and it does look like it's committed), I'd suggest a simpler change, which is just to use $_GET instead of $_REQUEST.

The problem with using $_REQUEST is that it can contain cookie data (see http://php.net/manual/en/reserved.variables.request.php and http://php.net/request_order), depending on the php ini configuration. And cookie data with httponly set (see http://php.net/setcookie) should never leave the server.

Fabianx’s picture

I don't think this is committed, yet.

And I think using proper APIs is important to avoid such problems.

And I still believe the destination URL should be created before $_GET is merged with $_POST.

dsnopek’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
490 bytes
None View

I can also confirm that this issue occurs under nginx but not Apache. Does anyone know why? I really can't imagine how differences in webservers could cause this. But I know next to nothing about nginx, so that might be why I don't get it.

Anyway, I agree with @Fabianx in #68 that using the same APIs as in drupal_get_destination() which is being inlined here makes sense. This basically means switching from $_REQUEST to drupal_get_query_parameters() which has the magic property of skipping $_GET['q'].

So, here is a much shorter patch that both (a) fixes this problem for me under nginx and (b) makes the Views code closer to the code it's inlining.

Please let me know what you think!

brandy.brown’s picture

#71 worked for me. Thank you!

jayhawkfan75’s picture

Patch #71 worked for me as well. Thanks.

iStryker’s picture

Status: Needs review » Reviewed & tested by the community

Haven't tested, but that patch looks better. Calling the Drupal function to get the parameters vs getting them directly.

2 people said it worked, RTBC issue

xurizaemon’s picture

Issue tags: -dvcs11 +dvcs11 nginx

Here's hoping it gets into the next Views update I guess :S

RTBC++ from me too.

ivanjaros’s picture

I just stumbled upon this bug in Pantheon and #29 fixed it for me.

dsnopek’s picture

@ivanjaros: could you try the patch in #71 and see if that works for you too?

lunk_rat’s picture

#71 fixes it for me on BOA 2.4.4 with PHP 5.5.21, Nginx 1.7.9.1

Incidentally I am also creating a dashboard that uses AJAX-enabled views within a Seven overlay to provide edit links to content. This patch fixed my issue.

areynolds’s picture

#71 works beautifully in an nginx environment (tested both in Kalabox and Pantheon).

Also, might I add @dsnopek has impeccable patch labeling etiquette.

vadym.kononenko’s picture

#71 works for me.

Simon Georges’s picture

#71 fixed it for me on IIS 7.5. Great work everybody! Let's commit this ;-)

Simon Georges’s picture

Issue summary: View changes
Issue tags: -dvcs11 nginx +dvcs11, +nginx, +IIS
FutureFirstDave’s picture

Yup, #71 works for me too.

SocialNicheGuru’s picture

Will this fix in #71 work on apache or break its functionality while fixing nginx?

Fabianx’s picture

RTBC +1

dsnopek’s picture

@SocialNicheGuru: This fix doesn't break anything on Apache - everything continues to work fine there.

hanoii’s picture

@dsnopek just found this issue on panopoly on pantheon and remember about a this patch which I used to use in serveral of my sites, but now it has a patch from you, any chance to include the patch in panopoly as well: #2468989: Include views patch to fix destination query string on ajax calls from views ?

gmclelland’s picture

The patch in #71 works for me using NGINX on Pantheon

ChrisFlink’s picture

Patch #71 works for me too, and is RTBC but was not included in 7.x-3.11 release.
I wonder why?

MustangGB’s picture

Such a simple and elegant solution, let's have it!

RTBC++

lunk_rat’s picture

Priority: Major » Normal

This patch works great for my sites.

Every time Views gets a security release I start seeing people commenting "RTBC++" on patches that are ready because we all have to patch after installing the security release ;) ... let's drop this one off of the list of things to remember to do when we update our sites!

RogerRogers’s picture

@lunk_rat For real. It works. It has worked for years. Include it and be done with it.

Fabianx’s picture

Priority: Normal » Major

I think priority major is correct.

meaton’s picture

I can also confirm that this patch works well on Pantheon/NGINX.

dawehner’s picture

Status: Reviewed & tested by the community » Fixed

I totally agree that $_REQUEST contains too many information. We already merge into $_GET, so using that as part of drupal_get_query_parameters() should be fine.

Ups, I committed that as part of d08465de955b88e5f262c06d99b79ceb167dca88 already when trying things out locally, anyway,

git --allow-empty helped in that case. Committed that empty message and pushed to 7.x-3.x

  • dawehner committed c3536f4 on 7.x-3.x authored by dsnopek
    Issue #1036962 by acbramley, dsnopek, grahamC, mr.york, das-peter, wiifm...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

sushantpaste’s picture

Thanks for the patch :)

Solthun’s picture

I can confirm that this patch worked on an environment with nginx and also on Azure hosting with IIS.
Thanks for the patch!

BetoAveiga’s picture

(I know it's old, but it could help somebody searching the same like I did)
To fix this problem you can create/modify your module hook_init like this:

function your_module_init () {
  if (isset($_GET['destination'])) {
      $_GET['destination'] = str_replace( 'q=views/ajax&','',$_GET['destination']);
  }
}

It works for me.

michaeljhill’s picture

I'm having this issue while using the Jump Menu format of Views. I need AJAX to be enabled so that I can see my exposed filter in the view's block. Instead of getting sent to the expected address, I get directed to "document-root/views/ajax" when AJAX is turned on. I've tried the patches on this thread but they have not made a difference. I see several people saying this issue is only occurring on nginx, however I'm having this problem with apache being my web server.

Running:
Drupal 7.53
Views 7.x-3.15