close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Errors on restricted pages after upgrading to Power CMS 2

Thread began 5/25/2010 9:32 am by Larry | Last modified 6/01/2010 4:56 pm by Larry | 2067 views | 7 replies |

Larry

Errors on restricted pages after upgrading to Power CMS 2

All of my pages worked fine while using Power CMS 1, including the restricted pages on the site. I am now in the process of updating the code from Power CMS 2 to replace the Power CMS 1 code and I now get errors only on the pages that were restricted.

The error I am getting is:
Fatal error: Cannot redeclare wa_authenticateuser() (previously declared in /home7/papninon/public_html/UserReg/WA_SecurityAssist/Helper_PHP.php:10) in /home7/papninon/public_html/CMS2/WA_SecurityAssist/Helper_PHP.php on line 48

Any ideas why this is happening or help to correct this issue. If I delete all of the developer notes, I have some in the left sidebar and the main content area, then when I click on the link to the page, I am asked to log in as I should be. Once I log in I am taken to the page, but because I cannot add the developer notes from Power CMS 2, I am sort of out of luck with this.

Why would changing the developer notes from Power CMS 1 to Power CMS 2 create the above error?

I should also add that if I delete the code for the page restriction, I can then add in the developer notes from Power CMS 2 and the page works and looks right, but now it is not restricted to members. Just thought I would add this in case if may help in finding an answer to the error message.

I would appreciate any and all help/answers here.

Thank you

Larry

Sign in to reply to this post

Jason ByrnesWebAssist

Power CMS uses a security assist access rule to show or hide the live editing icon, this will conflict with existing security assist pages,

To get around the problem:
create a copy of the PowerCMS/WA_CMS/WA_CMS.php file, save it as WA_CMS2.php


In the backup version, comment out line 5:
//require_once( "../WA_SecurityAssist/Helper_PHP.php" );


on your pages, change the following:
<?php include("PowerCMS/WA_CMS/WA_CMS.php"); ?>

This will disable the live editing feature, but will get around the error message.
to:
<?php include("PowerCMS/WA_CMS/WA_CMS2.php"); ?>

Sign in to reply to this post

Larry

Jason, once again thank you for your quick and, I guess somewhat accurate response.

Here's what I did, I made a duplicate copy of PowerCMS/WA_CMS/WA_CMS.php and then just commented out line 5 as per your instructions. I then added all of the developer code from Power CMS 2 back to my pages, and I added back the security code,

php:
<?php require_once( "../UserReg/WA_SecurityAssist/Helper_PHP.php" ); ?>
<?php
if (!WA_Auth_RulePasses("Email Confirmed")){
    
WA_Auth_RestrictAccess("../UserReg/users_LogIn.php");
}
?>



And everything worked perfect. And here is where the somewhat accurate instructions come in. You mentioned that, "This will disable the live editing feature, but will get around the error message." This did not disable the live editing feature, the live editing feature still works just as expected after this fix.

"Update," actually Jason, yes this did disable the live editing feature on all of my pages except the one's that you need to be logged into to view. Is there some way to correct this issue as I only have a handful of pages where you need to be logged into in order to view them, and quite a few pages that are viewable to anyone. I sure could use a fix for this now, is there something in Security Assist that can correct this. ?


Thank you

Larry

Sign in to reply to this post

Jason ByrnesWebAssist

the edit button is triggered by a security assist rule.


You could recreate the security assist rule in your access rules manage:

Name: Administrator

Conditions:
Allow IF
Value: <?php echo $_SESSION['AdminLogin']; ?>
Critiria: =
Compare to: <?php echo ((isset($GLOBALS['WAGLOBAL_Admin_Password']))?$GLOBALS['WAGLOBAL_Admin_Password']:"admin"); ?>

Allow If:
value: <?php echo $_SESSION['UserGroupID']; ?>
Criteria: =
Compare to: 1

See screen shot.

Sign in to reply to this post

Larry

Hi Jason,

When I looked at the Server Behaviors panel, there already was a security assist rule. It was named "SecurityAssist Show Region (Administrator)" and had the same exact rule as you indicated above.

So I'm not sure where to go from here. The Live edit button still only shows on the protected pages of the site.

Any other ideas or suggestions?

Thanks

Larry

Sign in to reply to this post

Larry

Hi Jason,

When I looked at the Server Behaviors panel, there already was a security assist rule. It was named "SecurityAssist Show Region (Administrator)" and had the same exact rule as you indicated above.

So I'm not sure where to go from here. The Live edit button still only shows on the protected pages of the site.

Any other ideas or suggestions?

Thanks

Larry

Sign in to reply to this post

Jason ByrnesWebAssist

Only on pages that are protected by security assist already do you need to attach the new PowerCMS/WA_CMS/WA_CMS2.php file.

On all of the other pages of your site, you should attach the PowerCMS/WA_CMS/WA_CMS.php file.

Sign in to reply to this post

Larry

Hello again Jason,

I recreated the Security Assist rule and used your suggestion from below, and everything works fine now, except I now have the same issue with every page in the User Registration Solution Pack.

I am not sure which rule to change or recreate in the User Registration Solution Pack to correct this problem. Can you please give me some step by step guidance with this as I would rather not mess up anything that is already working.

Thank you

Larry


Originally Said By: Jason Byrnes
  Only on pages that are protected by security assist already do you need to attach the new PowerCMS/WA_CMS/WA_CMS2.php file.

On all of the other pages of your site, you should attach the PowerCMS/WA_CMS/WA_CMS.php file.  
Sign in to reply to this post

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...