[wp-hackers] r2748 broken edit-form-advanced.php javascript part.

Robert Deaton false.hopes at gmail.com
Sun Aug 7 02:33:49 GMT 2005


Two things. If Alex King's advanced edit form is a plugin, then we may
have to accept the fact that it is going to break from 1.5 to 1.6.
Second, this sort of post belongs on the testers list, as the recent
thread on the matter discusses.

On 8/6/05, Gea-Suan Lin <gslin at ccca.nctu.edu.tw> wrote:
> (my WordPress version is 1.6-ALPHA-do-not-use)
> 
> After checkout the latest version, I found I can't use alexking's advanced
> edit mode. After check the diff, I found the problem is in r2748.
> 
> See: http://trac.wordpress.org/changeset/2748#file0
> 
> If you put the following line before id="content", the javascript will fail:
> edCanvas = document.getElementById('content');
> 
> In my Firefox 1.0.6, javascript console says:
> 
> Error: myField has no properties
> Smurce File: http://gslin.org/wp-admin/quicktags.js
> Line: 292
> 
> So I quickly fix it: (but I don't know if this fix will break tinymce)
> 
> --- edit-form-advanced.php      Sat Aug  6 16:35:00 2005
> +++ /home/gslinn/edit-form-advanced.php Sat Aug  6 16:36:02 2005
> @@ -139,6 +139,11 @@
>  <legend><?php _e('Post') ?></legend>
>  <?php if ( !get_option('rich_editing') ) : ?>
>  <?php the_quicktags(); ?>
> +<script type="text/javascript">
> +<!--
> +edCanvas = document.getElementById('content');
> +//-->
> +</script>
>  <?php endif; ?>
>  <?php
>   $rows = get_settings('default_post_edit_rows');
> @@ -147,11 +152,6 @@
>   }
>  ?>
>  <div><textarea title="true" rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="2" id="content"><?php echo $post->post_content ?></textarea></div>
> -<script type="text/javascript">
> -<!--
> -edCanvas = document.getElementById('content');
> -//-->
> -</script>
>  </fieldset>
> 
>  <?php echo $form_pingback ?>
> @@ -216,4 +216,4 @@
> 
>  </div>
> 
> -</form>
> +</form>
> 
> --
> * Gea-Suan Lin  (public key: http://ccreader.nctu.edu.tw/~gslin/key.txt)
> * If you cannot convince them, confuse them.           -- Harry S Truman
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
> 


-- 
--Robert Deaton
http://somethingunpredictable.com


More information about the wp-hackers mailing list