This is getting super exciting!

I'd tried a previous combo of Popups API and subedit and gave up on it.
Now trying with most recent versions.

Loving the stackable popups BUT. . .

. . . everything seems to be working OK 'cept after clicking to edit my fieldgroup, then editing and clicking on "SAVE" the popup hangs.

I get the "loading" animation and the grey screen forever, until I click on the page to deactivate the popup.

I really hope you can get this sorted out 'cos I LOVE where you're going with this.

Thanks!

Comments

austintnacious’s picture

Title: Subedit Popup hangs on save. . . » Subedit Popup hangs on save. . . conflict with checkout.module and/or ajax.module

OK, I've been trying to get this to work for a while now, considering possible conflicts with other modules. . .

I turned off checkout.module and got the "Save" button to work to an extent.

Now when I click "Save" i get the final status popup which says "Bad response form submission".
When that popup is dismissed (either automatically via the Popups admin setting or by clicking OK) I get a white screen with the output quoted below. . . (I have no idea what to make of that).

When I go back to the node page and refresh my edit has been saved but something isn't working right, as you can see.
Any ideas, I hope I'm being more of a help "testing" this than a hinderance. . .

Also I got a popup at one point indicating a conflict /error with ajax.module ("unknown error has occurred") I have not tried disabling it yet. . .

{ "content": "\x3cform action=\"/editablefields_html/35/field_title_sub\"  accept-charset=\"UTF-8\" method=\"post\" id=\"editablefields-form\"\x3e\n\x3cdiv\x3e\x3cinput type=\"hidden\" name=\"form_build_id\" id=\"form-9adc4875f73f233560b8ba5fc9fe3bec\" value=\"form-9adc4875f73f233560b8ba5fc9fe3bec\"  /\x3e\n\x3cinput type=\"hidden\" name=\"form_token\" id=\"edit-editablefields-form-form-token\" value=\"8a1781b22840a9e7e194b0e3e2e9fc18\"  /\x3e\n\x3cinput type=\"hidden\" name=\"form_id\" id=\"edit-editablefields-form\" value=\"editablefields_form\"  /\x3e\n\x3cfieldset class=\" collapsible collapsed\"\x3e\x3clegend\x3eCAPTCHA: no challenge enabled\x3c/legend\x3e\x3ca href=\"/admin/user/captcha/captcha/captcha_point/editablefields_form?destination=editablefields_html%2F35%2Ffield_title_sub\"\x3ePlace a CAPTCHA here for untrusted users.\x3c/a\x3e\x3c/fieldset\x3e\n\x3cdiv class=\"form-item\" id=\"edit-field-title-sub-0-value-wrapper\"\x3e\n \x3cinput type=\"text\" name=\"field_title_sub[0][value]\" id=\"edit-field-title-sub-0-value\" size=\"60\" value=\"With Mamadou Diaow\" class=\"form-text text\" /\x3e\n \x3cdiv class=\"description\"\x3eEnter an optional Sub-Title here\x3c/div\x3e\n\x3c/div\x3e\n\n\x3c/div\x3e\x3c/form\x3e\n", "__callbacks": [ "Drupal.AjaxLoad.loadFiles" ], "scripts": { "core": { "misc/jquery.js": { "cache": true, "defer": false, "preprocess": true }, "misc/drupal.js": { "cache": true, "defer": false, "preprocess": true }, "misc/collapse.js": { "cache": true, "defer": false, "preprocess": true } }, "module": { "sites/all/modules/ajax_load/ajax_load.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/files/countdowntimer/timer.js": { "cache": true, "defer": false, "preprocess": false }, "sites/all/modules/editablefields/editablefields.js": { "cache": true, "defer": false, "preprocess": true }, "misc/jquery.form.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/jquerymenu/jquerymenu_no_animation.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/shadowbox/shadowbox/build/adapter/shadowbox-jquery.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/shadowbox/shadowbox/build/shadowbox.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/shadowbox/shadowbox_auto.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/shadowbox/shadowbox.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/shadowbox/shadowbox/src/skin/classic/skin.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/shadowbox/shadowbox/build/lang/shadowbox-en.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/shadowbox/shadowbox/build/player/shadowbox-img.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/shadowbox/shadowbox/build/player/shadowbox-swf.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/shadowbox/shadowbox/build/player/shadowbox-flv.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/shadowbox/shadowbox/build/player/shadowbox-qt.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/shadowbox/shadowbox/build/player/shadowbox-wmp.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/shadowbox/shadowbox/build/player/shadowbox-html.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/shadowbox/shadowbox/build/player/shadowbox-iframe.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/spamspan/spamspan.compressed.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/teleport/teleport.js": { "cache": true, "defer": false, "preprocess": true }, "misc/autocomplete.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/panels/js/panels.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/popups/popups.js": { "cache": true, "defer": false, "preprocess": true }, "misc/collapse.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/files/googleanalytics/ga.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/google_analytics/googleanalytics.js": { "cache": true, "defer": false, "preprocess": true } }, "setting": { "basePath": "/", "googleanalytics": { "trackOutgoing": 1, "trackMailto": 1, "trackDownload": 1, "trackDownloadExtensions": "7z|aac|avi|csv|doc|exe|flv|gif|gz|jpe?g|js|mp(3|4|e?g)|mov|pdf|phps|png|ppt|rar|sit|tar|torrent|txt|wma|wmv|xls|xml|zip" }, "shadowbox": { "flv_player": "/sites/all/modules/shadowbox/shadowbox/flvplayer.swf", "animation": 1, "animation_fade": 1, "animation_sequence": "wh", "modal": false, "overlay_color": "000", "overlay_opacity": "0.85", "flash_background": "000000", "autoplay_movies": 1, "show_movie_controls": 1, "slideshow_delay": "0", "resize_duration": "0.35", "fade_duration": "0.35", "display_nav": 1, "continuous_galleries": 1, "display_counter": 1, "counter_type": "default", "counter_limit": "10", "viewport_padding": 20, "handle_oversize": "resize", "handle_unsupported": "link", "initial_height": 320, "initial_width": "320", "enable_keys": 1, "extensions_img": [ "png", "jpg", "jpeg", "gif", "bmp" ], "extensions_swf": [ "swf" ], "extensions_flv": [ "flv", "mp4", "mov" ], "extensions_qt": [ "dv", "moov", "movie" ], "extensions_wmp": [ "asf", "wm", "wmv" ], "extensions_qtwmp": [ "avi", "mpg", "mpeg" ], "extensions_iframe": [ "asp", "aspx", "cgi", "cfm", "htm", "html", "pl", "php", "php3", "php4", "php5", "phtml", "rb", "rhtml", "shtml", "vbs" ], "auto_enable_all_images": 1, "auto_gallery": 1 }, "spamspan": { "m": "spamspan", "u": "u", "d": "d", "t": "t" }, "popups": { "originalPath": "editablefields_html/35/field_title_sub", "defaultTargetSelector": "#content-area", "modulePath": "sites/all/modules/popups", "autoCloseFinalMessage": 1 } }, "inline": [ { "code": "var text_resize_scope = \"content-inner\";\n    var text_resize_minimum = \"12\";\n    var text_resize_maximum = \"25\";\n    var text_resize_line_height_allow = 1;\n		var text_resize_line_height_min = 16;\n    var text_resize_line_height_max = 36;", "defer": false } ], "file": { "sites/all/modules/text_resize/jquery.cookie.js": { "cache": true, "defer": false, "preprocess": true }, "sites/all/modules/text_resize/text_resize.js": { "cache": true, "defer": false, "preprocess": true } } }, "css": { "all": { "module": { "modules/book/book.css": true, "modules/node/node.css": true, "modules/system/defaults.css": true, "modules/system/system.css": true, "modules/system/system-menus.css": true, "modules/user/user.css": true, "sites/all/modules/cck/theme/content-module.css": true, "sites/all/modules/date/date.css": true, "sites/all/modules/date/date_popup/themes/datepicker.css": true, "sites/all/modules/date/date_popup/themes/timeentry.css": true, "sites/all/modules/fckeditor/fckeditor.css": true, "sites/all/modules/filefield/filefield.css": true, "sites/all/modules/imagefield/imagefield.css": true, "sites/all/modules/indexpage/indexpage.css": true, "sites/all/modules/jquerymenu/jquerymenu.css": true, "sites/all/modules/logintoboggan/logintoboggan.css": true, "sites/all/modules/quotes/quotes.css": true, "sites/all/modules/shadowbox/shadowbox/src/skin/classic/skin.css": true, "sites/all/modules/sitedoc/sitedoc.css": true, "sites/all/modules/switchtheme/switchtheme.css": true, "sites/all/modules/teleport/teleport.css": true, "sites/all/modules/text_resize/text_resize.css": true, "sites/all/modules/calendar/calendar.css": true, "misc/farbtastic/farbtastic.css": true, "sites/all/modules/cck/modules/fieldgroup/fieldgroup.css": true, "sites/all/modules/panels/css/panels.css": true, "sites/all/modules/popups/popups.css": true, "sites/all/modules/popups/skins/basic/basic.css": true }, "theme": { "sites/all/themes/TheBlackE/style.css": true, "sites/all/themes/TheBlackE/css/tabs.css": true, "sites/all/themes/TheBlackE/css/layout-fixed.css": true, "sites/all/themes/TheBlackE/css/main.css": true } }, "print": { "module": [  ], "theme": { "sites/all/themes/TheBlackE/css/print.css": true } } } }
austintnacious’s picture

Title: Subedit Popup hangs on save. . . conflict with checkout.module and/or ajax.module » Subedit Popup hangs on save. . . possible conflict with checkout.module and/or ajax.module?

OK, while I can definitely confirm the conflict with checkout.module I am getting closer to working things out and getting subedit to work on my site.

. . . the value of reading the README. . .

I read in the read me . . .

Open the page.tpl.php file for your theme, and search for "print $content".
  The $content should be surrounded by a div with an id. Ex:
    <div id="content-content">
      <?php print $content; ?>
    </div> <!-- /content-content -->
  In this case, just enter '#content-content' into the Content Selector field.
  Unfortunately, a lot of themes do not have well defined content areas.  Just add the div yourself,
  and then complain on the issue queue for the theme.  It is important that there are no other
  print statements inside the div.

I had a look in my page.tpl.php file (I'm using a very CSS modified "Basic 6.x-1.2" theme, I've made no changes to the theme's php).

Basic uses "echo" rather than "print"
I'm not a programmer but I know that echo and print do roughly the same thing although they may have deeper significance for programmers.
I changed echo to print for $content in my theme and uploaded.

Subedit appears to be mostly working now, except I still get the "Bad response form submission" error with the final dialogue.
My edits are saved tho'!

So maybe I should submit a feature request to ask that you make subedit handle both print and echo. . .

I also notice that I don't get the drupal default node updated message.
I like getting those messages as when I do I assume that everything is working well together.
When I don't get the drupal system message I feel / think/ know something isn't working quite right. . .

starbow’s picture

Wow, you've got at lot going on in your page. Just at guess, but ajax and shadowbox both seem like modules likely to conflict with popups.
I think echo and print are the same thing, although Drupal devs never use echo. I didn't know any themers did.

Your first step is to just get Popups API working on your setup. A good test is to enable the popup test module, go to popups/test, and try some of the links there. Especially the "Change Settings and ajax update entire content area" which tests a basic form modifying the original page. Toggle the "Auto Close" setting and see if the value in the parentheses changes....although, come to think of it, it is possible that this test is broken in Alpha4. Try the "Change Settings and reload entire page." first. If that doesn't toggle the values, then the test is broken.

austintnacious’s picture

Hi, thanks for the response!

I'll try the test as you describe.
It got late last night and I gave up so now I can't remember exactly where I got to but I have the following additional observation(s).

Popups subedit has trouble with Drupal's caching system. Stops working in various ways. Right now though with all chaching off all I'm getting is the whole node edit form in the popup, rather than just the fieldgroup. . .

austintnacious’s picture

Tried the tests, the popups seem to be working OK 'cept they don't seem to be behaving 100%.

Like if I understand your response above then when I try some of the tests, toggling the auto close last dialogue checkbox does not change the value in parentheses at the original link on the popus/test page.

So there also seems to be a bit of a conflict with the Node Edit Protect module.

Like I'm getting slightly better usability having disabled that module.

Yes, I do have a lot going on on the site but isn't that the beauty of Drupal?

I guess I need to ask straight up if you think that popups API and subedit etc are likely to get to a stage where they can co-exist well with other modules.

I love where you're going with it and would really like to use it but I can't sacrifice caching and other bits of functionality / protection offered by other modules. . .

Happy to test along the way if you're heading towards broad compatibility. . .

bfr’s picture

Print returns a value and echo does not, so echo is marginally faster, and they have slightly different syntax. No other differences.
I usually use echo, but in some situations you can make use of prints return value.. like some functions or more complex expressions:

while(print("Here we go again")) 
{ 
    // ... 
} 

or

$b ? print "true" : print "false";
chien_fu’s picture

I'm having an issue similar to this, except it was working fine a minute ago. I made no changes except to change the values of a couple CCK field on some nodes. One time it worked fine and the next time a tried it, on another node, I get the popup and when I try to save it now just hangs forever on the loading graphic.

Okay.. so I went back to a node that originally worked and it worked correctly again, so it depends on the particular node that I'm editing. What could be the cause of this?

glarsch’s picture

I also was experiencing this issue. For me, it turned out that it was 2 fields causing the issue. Both fields were file upload fields. Once I removed those fields, the pop-up saved correctly.