When I try to save PHP buttons, they are passed to drupal_eval() before.

This happens on a Windows machine (Windows XP) with Apache 2.2.3, PHP 5.2, MySQL 5.1.4-beta, even with the standard buttons the modules comes with. It doesn't happen on a machine with Linux, Apache 1.4, MySQL 4.1.

The result of this bug is that the module saves what the PHP code returns, not the PHP code itself.

CommentFileSizeAuthor
#5 bueditor.module.patch1.01 KBufku

Comments

ufku’s picture

are you sure?
there is no php evaluation during saving process.
does the default image button also have the same problem?

avpaderno’s picture

Yes, it does.

I have this issue already with a plain installation of the module. On the Linux machine I see the code starting with php:, while on the Windows machine I see the text which is supposed to be returned from the PHP code, like if the code would have been executed before to save the buttons.

avpaderno’s picture

Actually, the code associated with the buttons appears uncorrect from the first time one edits the buttons associated with the default editor. It seems then the wrong operation is done before the buttons definition.

In any cases, the code associated with the buttons is evalued before the right time, that I think it should be right before the editor is rendered and showed to the user.

ufku’s picture

this is really interesting. there is no way i can reproduce it. and the code says it is not possible.
you're alone on this Kiam. good luck.

ufku’s picture

Title: Impossible to save PHP buttons » Php buttons are saved evaluated(PHP5)
Status: Active » Needs review
StatusFileSize
new1.01 KB

this is specific to php5. i was trying to reproduce this bug using php4 with no luck. when i installed php5 i saw that the issue is about bueditor_buttons returning button objects by reference. php4 copied them however.

avpaderno’s picture

Status: Needs review » Reviewed & tested by the community
avpaderno’s picture

Title: Php buttons are saved evaluated(PHP5) » Php buttons are saved evaluated (PHP5)
Status: Reviewed & tested by the community » Fixed

The patch has been already applied to the version 5.x-1.1 of the module, without any notice here.

I guess that means the issue should now be set as fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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