close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

'Notice: Undefined index' error for "Show region's" on remote server only

Thread began 10/22/2015 7:31 am by s.joiner74419001 | Last modified 10/23/2015 10:52 am by Ray Borduin | 1586 views | 7 replies |

s.joiner74419001

'Notice: Undefined index' error for "Show region's" on remote server only

I have numerous 'Security Assist / Show region' being used all of which work fine when viewing locally. But when I upload pages to the remote server i get 'Undefined Index' notice similar to the following:

Notice: Undefined index: actions in E:\Domains\r\rtmf.org.uk-20218885\user\htdocs\federation\members\login-m.php on line 238

Ive had this before where I didn't have the '<?php require_once( "../../webassist/security_assist/helper_php.php" ); ?>' file reference at the top of the page. But this is there as it is fine when viewing locally.

I've attached a sample page that has the problem.

Any ideas?

Attached Files
login-m.php
Sign in to reply to this post

Ray BorduinWebAssist

Update this line:
<?php
if ("".$_GET['actions'] ."" == "failedLogin") { // WebAssist Show If
?>

to:
<?php
if ("".(isset($_GET['actions'])?$_GET['actions']:"") ."" == "failedLogin") { // WebAssist Show If
?>

Sign in to reply to this post
Did this help? Tips are appreciated...

s.joiner74419001

Thanks Ray. What I don't understand is I'm using WA plugins to create these so how come they need correcting manually. What is this update doing to ensure it works remotely?

Sign in to reply to this post

Ray BorduinWebAssist

You probably don't have notices turned on to display locally. It is a difference in your php alert settings. Technically this is just a notice that can be ignored, but your remote server is configured to stop and show notices instead of ignoring them.

It looks like you manually applied the webassist show if server behavior on the page to show the failed login message... it isn't the code our wizard creates unless you are running an older version.

The issue is the value put into the show if was <?php echo($_GET['action']); ?> and php will throw a notice if you refer to a variable that doesn't exist even if it is a URL parameter. The solution could have been implemented in the UI as well by using the compare value:

<?php echo(isset($_GET['action'])$_GET['action']:""); ?>

that basically checks if the variable is set before trying to reference it's value directly.

Sign in to reply to this post
Did this help? Tips are appreciated...

s.joiner74419001

The reason I'm having to enter them manually is because the 'OK' button on the 'Show region utility' does not work. So I can not create the code with the wizard. I have meant to post in the forum about this but haven't got round to it. I think maybe I might have based my manual efforts from an older web-site. I will try this adjustment.

In the keen time any ideas why the 'OK'button on the 'Show region utility' window is not working. Its as if its just a flat static graphic.

Sign in to reply to this post

Ray BorduinWebAssist

I think that was an issue several versions back that we resolved. Do you have the latest version of Data Bridge installed? I just tested and it appears to work correctly for me.

Sign in to reply to this post
Did this help? Tips are appreciated...

s.joiner74419001

My version is 1.2.3 which is the latest, but I uploaded again and the OK button now works. But the 'Show region utility is till producing the same code. and not as per the example you posted.

Any ideas?

Thanks!

Sign in to reply to this post

Ray BorduinWebAssist

You have to use this syntax in the field in the show region:

<?php echo(isset($_GET['action'])$_GET['action']:""); ?>

You can only refer to:
<?php echo($_GET['action']); ?>

if there will always be an action in the url, which there won't on your page.

It is a valid input, so our extension won't catch and refuse to use it, but it doesn't know that the variable you are referencing won't always exist. Since it won't you have to use code that checks if it exists before using it like:
<?php echo(isset($_GET['action'])$_GET['action']:""); ?>

In web assist bindings we will add that automatically, but when you use the Dremweaver bindings or hand code, you need to add it manually if the variable might not exist.

Sign in to reply to this post
Did this help? Tips are appreciated...

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...