Title: [Plugin: WP Page Widget] Problem with Text widget
Last modified: August 20, 2016

---

# [Plugin: WP Page Widget] Problem with Text widget

 *  Resolved [Lucas Martins](https://wordpress.org/support/users/lucasmartins/)
 * (@lucasmartins)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-page-widget-problem-with-text-widget/)
 * Hello, when I try to add the widget “Text” I can not save the page. Can anyone
   help me?
 * [http://wordpress.org/extend/plugins/wp-page-widget/](http://wordpress.org/extend/plugins/wp-page-widget/)

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Thread Starter [Lucas Martins](https://wordpress.org/support/users/lucasmartins/)
 * (@lucasmartins)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-page-widget-problem-with-text-widget/#post-2354443)
 * Describing the problem better, when I add Text widget, for example, when trying
   to save the page, these widgets disappears.
 *  [ZIC](https://wordpress.org/support/users/metalscorpion/)
 * (@metalscorpion)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-page-widget-problem-with-text-widget/#post-2354463)
 * Hello lucasmartins!
 * I checked the case add Text widget you said, and do not see problem.
    So can 
   you make the double test to check this case. And then, if this bug is continue
   to occur, can you please provide the way to reproduce with your WordPress system
   information?
 * Thanks!
 *  [macjoost](https://wordpress.org/support/users/macjoost/)
 * (@macjoost)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-page-widget-problem-with-text-widget/#post-2354473)
 * Hi,
 * Like the plugin a lot, but have the same problem as lucasmartins
 * Spend some time on it and finally discovered that the plugin works fine in FF,
   but doesn’t work with Safari or Chrome on the Mac.
 * Somehow when dragging a “simple” widget like the Text widget to the sidebar, 
   in the resulting HTML the `<form>` tags are missing.
 * When dragging a more complex widget like the Tags widget to the sidebar, all 
   works fine.
 * I’m completely puzzled by this. I did quite some testing, checking the loaded
   JS libraries etc. but I can’t find any solution.
 *  [Sam Scholfield](https://wordpress.org/support/users/sam-s/)
 * (@sam-s)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-page-widget-problem-with-text-widget/#post-2354481)
 * Just encountered the same problem. I solved it by making sure I had at least 
   1 widget selected by default (using the standard WordPress widgets screen). The
   plugin only worked if one widget already existed for it to replace.
 *  [macjoost](https://wordpress.org/support/users/macjoost/)
 * (@macjoost)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-page-widget-problem-with-text-widget/#post-2354482)
 * Hi all,
 * Scoe’s solution did not work for me, so I investigated a little further.
 * Found that Webkit browsers (Safari, Crome) don’t allow for nested form elements
   to be created using javascript. That is what the “add widget” drag-drop does.
 * I’ve changed the plugin PHP (see below) so that it transforms the <form> elements
   into <div> elements. Next changed the plugin JavaScript to conform to that change.
 * It works for me on Safari, Chrome, FireFox and IE.
 * Please test some more 🙂
 * Hope Metalscorpion or CodeAndMore are following…
 * **Edit wp-page-widgets.php**
    1. add new function
 *     ```
       function pw_fix_widget_forms( $list = '' ) {
       	ob_start();
       	switch( $list ) {
       	case 'wp_list_widgets':
       		wp_list_widgets();
       		break;
       	default:
       		wp_list_widget_controls($list);
       		break;
       	}
       	$output = ob_get_clean();
       	ob_end_clean();
       	$output = str_replace ( array('<form action="" method="post">','</form>'), array('<div class="pw_postbox">','</div>'), $output );
       	echo $output;
       }
       ```
   
 * 2. Change line 245 to
    `<?php pw_fix_widget_forms('wp_list_widgets'); ?>`
 * 3. Change line 260 to
    `<?php pw_fix_widget_forms('wp_inactive_widgets'); ?>`
 * 4. Change line 283 to
    `<?php pw_fix_widget_forms( $sidebar ); // Show the control
   forms for each of the widgets in this sidebar ?>`
 * **Edit page-widgets.js**
    Change line 191 to `var sb = widget.closest('div.widgets-
   sortables').attr('id'), data = widget.find('.pw_postbox').find('input, textarea').
   serialize(), a;`
 *  [macjoost](https://wordpress.org/support/users/macjoost/)
 * (@macjoost)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-page-widget-problem-with-text-widget/#post-2354483)
 * Ok, error in the pw_fix_widget_forms function. Improved version below:
 *     ```
       function pw_fix_widget_forms( $list = '' ) {
       	ob_start();
       	switch( $list ) {
       	case 'wp_list_widgets':
       		wp_list_widgets();
       		break;
       	default:
       		wp_list_widget_controls($list);
       		break;
       	}
       	$output = ob_get_contents();
       	ob_end_clean();
       	$output = str_replace ( array('<form action="" method="post">','</form>'), array('<div class="pw_postbox">','</div>'), $output );
       	echo $output;
       }
       ```
   
 *  [Podd63](https://wordpress.org/support/users/podd63/)
 * (@podd63)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-page-widget-problem-with-text-widget/#post-2354486)
 * I’ve just tried your proposition but it’s not working for me…
    I just don’t understand!
   It was working very well few days ago and now it’s down ! The only thing that
   is working is to deselect plugins I’ve put in widget WP area.
 *  Plugin Author [CodeAndMore](https://wordpress.org/support/users/codeandmore/)
 * (@codeandmore)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-page-widget-problem-with-text-widget/#post-2354495)
 * It works for us for Text Widget without these modifications.
    Please download
   latest 1.4 and try again. Best regards, Tien_[ [Signature moderated.](http://codex.wordpress.org/Forum_Welcome#Signatures)]_
 *  [macjoost](https://wordpress.org/support/users/macjoost/)
 * (@macjoost)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-page-widget-problem-with-text-widget/#post-2354496)
 * Hi Tien,
 * Thanks for the update.
 * I’m afraid that the new version still does **not** work on/with:
    - Chrome browser (tested on both Windows and Mac OS X)
    - Safari browser (tested on Mac OS X)
 * It does work in FireFox (tested on both Windows and Mac) and Internet Explorer.
 * What I did:
    1. Open an existing Post to edit.
    2. Drag a new Text widget from the “Available Widgets” window
    3. Edit the new widget and click “save”
 *  [Mladen Gradev](https://wordpress.org/support/users/joe8104/)
 * (@joe8104)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-page-widget-problem-with-text-widget/#post-2354498)
 * I confirm macjoost`s words.
 * Works with: Internet Explorer 8, Firefox 9.0.1
    Does NOT work with: Opera 11.61,
   Chrome 16 Windows 7 x64
 * This is strange, but at least now it is working on IE and FF. None of them is
   my favorite browser.
 *  Plugin Author [CodeAndMore](https://wordpress.org/support/users/codeandmore/)
 * (@codeandmore)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-page-widget-problem-with-text-widget/#post-2354499)
 * OK thanks for reporting we will check on these browsers and may fix.
    Best regards,
   Tien_[ [Signature moderated.](http://codex.wordpress.org/Forum_Welcome#Signatures)]_
 *  [macjoost](https://wordpress.org/support/users/macjoost/)
 * (@macjoost)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-page-widget-problem-with-text-widget/#post-2354500)
 * Super!
 * I can recommend my hacks above 😉
 *  [Thanh Sang Nguyen](https://wordpress.org/support/users/ntsasng/)
 * (@ntsasng)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-page-widget-problem-with-text-widget/#post-2354501)
 * Dear macjoost
    Please download latest version and try again. Best regards, Sang–
   CodeAndMore.
 *  [macjoost](https://wordpress.org/support/users/macjoost/)
 * (@macjoost)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-page-widget-problem-with-text-widget/#post-2354502)
 * Hello Sang,
 * Tested latest in Safari and Chrome on Mac OS X with WP 3.3.1 and it works!
 * Nice fix. Thanks!

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘[Plugin: WP Page Widget] Problem with Text widget’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-page-widget_fcfbfc.svg)
 * [WP Page Widget](https://wordpress.org/plugins/wp-page-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-page-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-page-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-page-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-page-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-page-widget/reviews/)

 * 14 replies
 * 8 participants
 * Last reply from: [macjoost](https://wordpress.org/support/users/macjoost/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-wp-page-widget-problem-with-text-widget/#post-2354502)
 * Status: resolved