Jump to content

Page Protector


adrian

Recommended Posts

@ottogal - I just tested here to confirm it is still working as expected with PW 3 and everything seems to be fine. Unfortunately I am traveling at the moment with very limited internet access so I don't really have much time to help you at the moment. Is it possible you also have some other modules that are impacting access permissions? I would try testing on a clean PW install to see if you can narrow down the issue.

I'll check back in again when I can to see where you're at.

Link to comment
Share on other sites

It's still there for me. Remember this will only be on the main module config settings page, not the settings tabs for individual pages.

Also, note that once you have protected the homepage, this shortcut is no longer available - it doesn't have any purpose in this case.

post-985-0-55478100-1458177940_thumb.png

Link to comment
Share on other sites

once you have protected the homepage, this shortcut is no longer available - it doesn't have any purpose in this case.

I understand. But then the hint under Instructions ("... or use the "Protect Entire Site" shortcut below") should be removed in this case, too.

Link to comment
Share on other sites

  • 2 weeks later...

Hi @ottogal,

I have just committed a new version which handles both your requests:

  • hiding the instructions about the shortcut to protecting the entire site
  • ability to set a default Prohibited Message in the module's config settings.

Let me know if you have any problems with this.

  • Like 4
Link to comment
Share on other sites

  • 4 weeks later...

Hi @adrian,

sorry for the late reply.

I tried to install the new version 0.1.5 from the Backend via Modules > Site. Despite the notification of the successful installation, the module was not upgraded.

(I'm running PW 3.0.15).

Link to comment
Share on other sites

Hi @adrian,

sorry for the late reply.

I tried to install the new version 0.1.5 from the Backend via Modules > Site. Despite the notification of the successful installation, the module was not upgraded.

(I'm running PW 3.0.15).

This sounds like a modules caching issue or maybe a FileCompiler caching issue? Can you try a Modules > Refresh? I'd be surprised if that doesn't work, but if not, maybe clear your FileCompiler cache as well? 

Link to comment
Share on other sites

Did both, same result: If I click "Continue to module settings" (below the "updated successfully" message), the settings show the 0.1.4 version.

I am not sure what to suggest. Can you take a look in the .module file and make sure it says: "15" as the version number?

If it does, then can you let me know if the new functionality is available despite the version number in the module config showing 14?

Link to comment
Share on other sites

Hhm, getModuleInfo() returns  'version' => 15, and all the files have the date of yesterday (my update). Obviously the update process was successful.

But the entry on Modules > Site continues to display 0.1.4, the settings page is the old one. The new functionality is not available...

Should I try to uninstall and reinstall the module, instead of updating?
 

Link to comment
Share on other sites

Should I try to uninstall and reinstall the module, instead of updating?

Sure, although if you have lots of separate pages protected you might want to copy the module settings from the modules DB table so you can add them back in without having to re-create them all after the reinstall.

Are you having issues with updating any other modules, or just this one?

Link to comment
Share on other sites

Are you having issues with updating any other modules, or just this one?

My other modules all are up-to-date, so I can't say.

copy the module settings from the modules DB table

Thank you for the idea!

Uninstalling and reinstalling the module solved the issue. (Before the reinstall I had to delete the files in the modules folder.) Many thank, adrian!

Link to comment
Share on other sites

I crowed too soon: After a new start of the backend I made a modules refresh to find the following "success" message (green):

  • Session: Cleared the admin theme navigation cache (topnav)

  • Session: Detected 1 module version change (will be applied the next time each module is loaded):

    PageProtector: 0.1.5 => 0.1.4
  • Session: Modules cache refreshed (112 modules)

  • Session: Module "FieldtypeEvents" has multiple files (bold file is the one in use). Click here to change which file is used

    /site/modules/FieldtypeEvents/FieldtypeEvents.module/site/modules/FieldtypeEvents-master/FieldtypeEvents.module
  • Session: Module "ImportPagesCSV" has multiple files (bold file is the one in use). Click here to change which file is used

    /site/modules/ImportPagesCSV-master/ImportPagesCSV.module/site/modules/ImportPagesCSV/ImportPagesCSV.module
  • Session: Module "InputfieldEvents" has multiple files (bold file is the one in use). Click here to change which file is used

    /site/modules/FieldtypeEvents/InputfieldEvents.module/site/modules/FieldtypeEvents-master/InputfieldEvents.module
  • Modules: Upgrading module (PageProtector: 0.1.5 => 0.1.4)

And the installed version is again 0.1.4 ...   :(

(By the way: In the case of multiple files for a module, one with the trailing "-master" and one without it, which one should I use? What's the difference?)

Link to comment
Share on other sites

Any chance you can PM me with access to this server, or is it a local dev setup?

Why do you have multiple copies of so many of your modules?

You should delete all the -master versions.

Also, when installing modules I would recommend the core method of installing by class name - it looks to me like you installed several modules manually and then used the upgrades modules to upgrade them - hence the extra copies. You must have a 0.1.4 version of PageProtector somewhere in your system.

Link to comment
Share on other sites

Now I installed the module via github, that worked without issues.

At the moment I can't give you access to the setup.

Thanks for the hints to the -master versions of modules. Again the question: What are they for, what's the difference to the others?

  • Like 1
Link to comment
Share on other sites

The -master issue is probably just a result of you manually unzipping and FTP'ing the module folder. If you use the modules page to install, either via class name, github url, or from your hdd you won't see these. 

PS Glad you are now seeing 0.1.5!

Link to comment
Share on other sites

Because when you manually unzip a project from Github it has "-master" or "-dev" etc in the folder name. You don't want this in PW, so you either need to manually remove this, or install automatically from the zip itself. If you install manually and then run the Upgrade module, it is adding the version without the -master so you end up with two versions. Does that explain it?

Link to comment
Share on other sites

Yep. :)  - As far as I see both versions of the module file are identical; so for a installed module of which I've got only the -master version, I can rename the file pruning the trailing "-master"?

Yes that would be preferable.

Link to comment
Share on other sites

Me:

As far as I see both versions of the module file are identical; so for a installed module of which I've got only the -master version, I can rename the file pruning the trailing "-master"?

You:

Yes that would be preferable.

That seems to be a bad idea:

When I removed the trailing  -master  from the folder's name  \site\modules\PageTableExtended-master  and tried to login, I got this Warning:

Field: Fieldtype 'FieldtypePageTableExtended' does not exist

With pruning the  -master  from  \site\modules\MarkupSimpleNavigation-master , I got an "non object" error message refering to the line where the navigation is rendered...

So I renamed back all these folders to their previous names (with trailing  -master). 

???

Link to comment
Share on other sites

That seems to be a bad idea:

Just make sure you run Modules > Refresh after renaming and they will work again.

The reason I think it's important is so that you can use the Upgrades module to upgrade all your modules to new versions easily. And in future if you install using the ClassName or the zip (via URL or upload), then you won't ever have to deal with the "-master".

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...