Jump to content

Modules Manager


Soma

Recommended Posts

Ryan

Just noting what you were saying about disclaimers and so on.

I have always wondered whether any system should have an overall "switch" that says This Site is in Production. That would mean that things like the Modules Manager would be have its connections cut unless it is specifically overridden by the administrator with password.

The reason I suggest that as a global switch is that there may be other things that an admin may want to be able to lock down in a production environment.

In the long term with modules, since they are hosted in a central repository, you will have to have some sort of QC prior to publishing because since you own the repository, you would be the first stop for any complaints .....

Not that I am trying to make you nervous or anything  :)

Link to comment
Share on other sites

All the issues you mention are the things that scare me about a built-in modules manager, and that have been on my mind for sure. I fully expect to have some new worries. But it's a worthwhile compromise. The modules manager adds a whole lot of value and convenience to ProcessWire. But I think it's going to have to be accompanied by a lot of warnings so that people know the security compromises they are taking when using it. For me personally, I will use it on development sites but not production sites. Though if we have a "trusted" collection of modules that are self hosted (by us), then that could go a long way towards making it more trustable on production servers. As for a global switch, I kind of see that as being the "superuser" role/account. Modules manager should only be accessible to superuser and nobody else. Maybe something more is needed, but I hate to add complexity when trying to add convenience.

Link to comment
Share on other sites

It is a difficult balance (as Google, Apple and, closer to home, Wordpress have discovered) between convenience and liability.

The main reason to keep all modules centrally hosted is that it becomes self promotional - if someone is looking for an ecommerce something and google brings up a PW module, then that leads them to ProcessWire. If that is hosted on the ProcessWire site, then the stickiness of the link is greatly increased and people are much more likely to follow through and find out what the core is about.

The downside is that it is difficult to keep QC over everything - the three above certainly haven't managed it even with a lot of resources!

Incidentally, what is the logistics of working this backwards? This is a silly idea and a little off topic, but here goes.

At the moment you install PW, then the Module Manager (which will get merged) and then a module that has some sparking functionality. A profile, perhaps.

So, what about if you can work it the other way - you find a wonderful module/profile/thingy that is exactly what you want for you next website creation, you click download or install, and it fetches the PW core for you ... and so on.

OKay, so probably only sensible for Profiles rather than someone's menu addition, but would be an interesting little bit of workflow. It means profiles can be advertised without the end user having to find their way back to the core first. That is about as sticky as you can get. It is like finding the perfect door handle and discovering the house is supplied automatically

Link to comment
Share on other sites

ProcessWire is a little bit of a different animal than some other CMSs in that it doesn't technically need any [additional] modules in order to do everything one could need. But in the case of profiles, those are something where the reverse works, and someone tracks down a system that does what they need, only to find later that it's built on ProcessWire. Turn-key profiles are definitely one of our paths to growth. 

Link to comment
Share on other sites

  • 2 weeks later...

Not sure if this has been covered.

Is there a way to add a navigation link, that shows up after installing a module that would take me back to the Module Manager, without clicking through from Setup and then Modules Manager?

It only saves one click, but it makes sense to have a link back to the modules manager, after installing a module, right beneath the uninstall option div.

Just a thought, since all things are customizable with PW.

Just installed an RSS module, here's the URL, for where I'm meaning a link could go back to the Modules Manager:

/processwire/module/edit?name=MarkupLoadRSS

Another option would be if it were added into the breadcrumbs, and the user could click back to the Modules Manager page from there.

Thanks for a great module.

Link to comment
Share on other sites

I see what you mean. I use my teflon theme so I don't know this problem as the top menu are dropdowns and it requires me 1 click to get back anyway. You could use my theme or place the "Modules Manager" admin page on root, instead of setup. :)

Well, it's possible of course. It would require a hook for the ProcessModule to render a link back to the Modules Manager. Since Modules Manager isn't autoload but a process module only loaded for that particular admin page, it's not something that can be done within Modules Manager and would require an additional module just for that.

Modules Manager is planned to be integrated in core at some point, so there will be lots of changes and improvements needed and will replace the current module page.

Link to comment
Share on other sites

Thanks Soma, just trying to be helpful from a usability standpoint with some input here.

It never occured to me that an admin theme might change the admin layout in that regard.

Good to know, thanks for the reply.

My guess was that a Modules Manager is too good not to be in the core version.

Great stuff, thanks again.

Link to comment
Share on other sites

  • 1 month later...

Recently had a little problem with an Update. I forgot to write it down, but if I remember correct - this is what happened:

I had the LanguageLocalizedUrl module installed (manually). This was only one .module file in /site/modules/.

After the update with ModulesManager, there was a Directory created with the same .module file inside under /site/modules.

Then I got some server error.

Maybe the module could check and rename an old module-file that is not in a folder?

Link to comment
Share on other sites

Yeah I know about this issue. Since LanguageLocalizedURL module by mcmorry was first a single file module. I think this could be added but it's an edge case and I think all modules should have their folder by default. I could check for the class name (if provided) and search for single files, but not sure it's worth for now, since this is still "alpha" and considered to be integrated into core there still lots of work to be done anyway.

Link to comment
Share on other sites

Hi, im a newbye with PW and i'm following the guide in the wiki in this LINK.

I have a fresh install of PW in a machine with windows 7 and xampp.

I've installed Modules Manager and when i select a module to download, i get always the same error:

File could not be downloaded https://github.com/...

The download links are like this:

href="./download/?url=https://github.com/apeisa/Thumbnails/zipball/master&class=FieldtypeCropImage"

i serched a while on the web and i found only the code where this error is called:

		// download the zip
		if(!$content = file_get_contents($url, $fileName, $context)) {
			$this->error("File could not be downloaded $url");
			return false;

could someone give me an hint? thanks

Link to comment
Share on other sites

Just pushed an new update today to replaced the "page-edit" permission from module config and replaced it with 'modules-manager', as editors with page edit permission were able to see this module in the admin.

So please update to the latest version in case you don't want you're editors to see Modules Manager.

Thanks @jkenters for the issue report.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Newb here, obviously by the title above :). Searched a while as I was having the same issue as nellone. Just so others will know, the above solution will also work in wamp. Looking forward to working with pw as potentially my new go-to cms.

  • Like 1
Link to comment
Share on other sites

I must not have done something correctly. I have the Modules Manger installed  and it's showing a list of all the modules. however every time I go to download one, I get this error:


"File could not be downloaded.There seems to be a problem with downloading or writing the module."

What do I need to do? Thanks!


        

   
Link to comment
Share on other sites

Tested on my local xampp installation (Win 7). At first got the same problem with the modules-manager.

Then I checked xampp\php\php.ini:

allow_url_fopen = On (was already set)

In the folder xampp\php\ext must be the php_openssl.dll. Now check in the php.ini if this extension string exist and is uncommented.

extension=php_openssl.dll (must be in php.ini)

Of course the extensions directory must be set (normally by default)

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
extension_dir = "F:\xampp\php\ext"

After that the module is running fine in my case (path depends on your system)

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

I also get "File could not be downloaded.There seems to be a problem with downloading or writing the module."

I am on a Ubuntu 12.04 OS. allow_url_fopen is on, permissions on /site/modules/ and /site/assets/ directories are 775 (also tried 777).

But still no success :'(

Any suggestions?

Link to comment
Share on other sites

@jmartsch, I think you encounter the same as the previous poster? is openssl installed?

I just pulled in an update from petsagouris with multitude of changes, one of which checks for the openssl module being installed.

udpate 1.0.7

- multitude of fixed and code cleanup (@petsagouris)
- added check for openssl module required for https download stream (@petsagouris)
- added back to Modules Manager button on download/update screen
  • Like 3
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...