WB 2.8.3 [R1638] SP1 Droplet Errors

N1kko

Reinstalled WB Seems to be fine now... Strange Thanks for all the help  :-D
My Tools: MacBook Pro Retina, Coda2, Sketch 3... Couldn't live without them

N1kko

If I add the droplet in phpmyadmin it works fine as it doesn't add the slashes. So is it magic quotes causing this?
My Tools: MacBook Pro Retina, Coda2, Sketch 3... Couldn't live without them

N1kko

Not sure what I need to do really. As far as I'm aware magic quotes is off on the server.

Thanks for your help guys  :wink:
My Tools: MacBook Pro Retina, Coda2, Sketch 3... Couldn't live without them

N1kko

#12
Here's my servers phpinfo as pdf magic quotes is off  :?

My Tools: MacBook Pro Retina, Coda2, Sketch 3... Couldn't live without them

jacobi22

Quote from: badknight on October 01, 2013, 02:39:06 PM

the Server is right - it is invalid ;)
Thats not a WB Problem - thers a problem with the server configuration ... e.g. http://php.net/manual/en/security.magicquotes.php unter php 5.3...

if you enter a String in the textarea (e.g. $myVar = 'Test';)
the server save this as $myVar = \'Test\'; <= and thats the problem


the droplet code works without problem
its exact the same code in wb 2.8.4

badknight

Quote from: N1kko on October 01, 2013, 02:26:33 PM
Saying SearchBox droplet is invalid

global $TEXT;
$return_value = true;
if (!isset($msg)) $msg=\'search this site..\';
$j = \"onfocus=\\\"if(this.value==\'$msg\'){this.value=\'\';this.style.color=\'#000\';}else{this.select();}\\\"
onblur=\\\"if(this.value==\'\'){this.value=\'$msg\';this.style.color=\'#b3b3b3\';}\\\"\";
if(SHOW_SEARCH) {
$return_value  = \'<div class=\"searchbox\">\';
$return_value  .= \'<form action=\"\'.WB_URL.\'/search/index\'.PAGE_EXTENSION.\'\" method=\"get\" name=\"search\" class=\"searchform\" id=\"search\">\';
$return_value  .= \'<input style=\"color:#b3b3b3;\" type=\"text\" name=\"string\" size=\"25\" class=\"textbox\" value=\"\'.$msg.\'\" \'.$j.\'  />&nbsp;\';
$return_value  .= \'</form>\';
$return_value  .= \'</div>\';
}
return $return_value;


The server is running PHP 5.4.20

I have set php error messages to E_All and I also have E_ALL ->PHP5.3.17 as an option

the Server is right - it is invalid ;)
Thats not a WB Problem - thers a problem with the server configuration ... e.g. http://php.net/manual/en/security.magicquotes.php unter php 5.3...

if you enter a String in the textarea (e.g. $myVar = 'Test';)
the server save this as $myVar = \'Test\'; <= and thats the problem
Ich würde gern die Welt verändern, doch Gott gibt mir den Quellcode nicht...

N1kko

Search box droplet throwing this error

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING in /home/site/public_html/modules/droplets/droplets.php(37) : eval()'d code on line 3
My Tools: MacBook Pro Retina, Coda2, Sketch 3... Couldn't live without them

N1kko

Saying SearchBox droplet is invalid

global $TEXT;
$return_value = true;
if (!isset($msg)) $msg=\'search this site..\';
$j = \"onfocus=\\\"if(this.value==\'$msg\'){this.value=\'\';this.style.color=\'#000\';}else{this.select();}\\\"
onblur=\\\"if(this.value==\'\'){this.value=\'$msg\';this.style.color=\'#b3b3b3\';}\\\"\";
if(SHOW_SEARCH) {
$return_value  = \'<div class=\"searchbox\">\';
$return_value  .= \'<form action=\"\'.WB_URL.\'/search/index\'.PAGE_EXTENSION.\'\" method=\"get\" name=\"search\" class=\"searchform\" id=\"search\">\';
$return_value  .= \'<input style=\"color:#b3b3b3;\" type=\"text\" name=\"string\" size=\"25\" class=\"textbox\" value=\"\'.$msg.\'\" \'.$j.\'  />&nbsp;\';
$return_value  .= \'</form>\';
$return_value  .= \'</div>\';
}
return $return_value;


The server is running PHP 5.4.20

I have set php error messages to E_All and I also have E_ALL ->PHP5.3.17 as an option
My Tools: MacBook Pro Retina, Coda2, Sketch 3... Couldn't live without them

jacobi22

#7
Quote from: N1kko on October 01, 2013, 11:16:43 AM
I'm running PHP Version 5.3.17
Droplet says invalid php code

not more?

put the Droplet-Code from the "error-droplet" in an page, like this here [[Lorem?blocks=6]]
look in Settings -> Advanced Setting and set PHP ERROR MESSAGES to ON

start the page with the droplet code in the frontend and you have a error messages like this

QuoteParse error: syntax error, unexpected 'global' (T_GLOBAL) in G:\cms\wb_test_1532\modules\droplets\droplets.php(37) : eval()'d code on line 5

look to eval()'d code on line (here line 5)
then go back to the error Droplet in Admin Tools -> Droplet and look to the line from the error message

for a test i delete the slash in Line 1  from the sectionPicker-droplet
thats my (wrong) code now - no Slash's for the comment in line 1
SectionPicker
//Load the view.php from any other section-module, including the frontend.css
//Use [[SectionPicker?sid=123]]

global $database, $wb, $TEXT, $DGTEXT,$section_id,$page_id;


the first working line is line 5 and php doesnt know what "global" is, so it give's a syntax error, unexpected 'global' and the script stops here.

i know, line 5 is ok, line 4 is empty, line 2 and line 3 are a comment, the error must be in line 1

badknight

take a look at the php - info
is magic_quotes_gpc on? (http://php.net/manual/en/security.magicquotes.php)

show us the droplet - code ..
Ich würde gern die Welt verändern, doch Gott gibt mir den Quellcode nicht...

N1kko

I'm running PHP Version 5.3.17
Droplet says invalid php code

Thanks
My Tools: MacBook Pro Retina, Coda2, Sketch 3... Couldn't live without them

ruebenwurzel

Hello,

wich PHP Version is running on your server?
What exactly are the messages?

Rev. 1638 didn't fully support PHP 5.x. F.e. some droplets produces error messages when installing them. This is fixed in the upcoming WB 2.8.4.

Matthias

N1kko

I deleted a couple which I didn't think I would need but decided to add again that's when the error occurred. So somethings not right  :?
My Tools: MacBook Pro Retina, Coda2, Sketch 3... Couldn't live without them

marmot

Hi,

Quote from: N1kko on September 30, 2013, 10:43:14 AM
If I remove code from a droplet and re-add it show invalid php code  :?
as I can see no use in removing something and adding the same again, just leave the droplet as it is :).

regards

N1kko

If I remove code from a droplet and re-add it show invalid php code  :?
My Tools: MacBook Pro Retina, Coda2, Sketch 3... Couldn't live without them