-
Posts
126 -
Joined
-
Last visited
Posts posted by Hari KT
-
-
Hi all,
Have you guys came across http://github.com/puli/ ? I am not sure how processwire is going to make use of composer in 3.0 apart from namespace ( I didn't noticed in the newsletter or probably missed in the blog posts ) . But I believe the concept of http://docs.puli.io/ combined with PSR-7 and composer will be a revolution in the PHP ( yet to see though ) .
I wished if processwire in 3.0 would take some of the good concepts to make things smooth and easy.
-
Hey Marcus,
Yes as dependency is a hell it is good to leave it to composer . And as you know installing modules is simple as
composer require <vendor/packagename>
The only thing to do is to keep a composer.json file for all the modules
{ "name": "vendor/package-name", "type": "pw-module", "description": "Your module what it does", "keywords": [ "keywords", "comma", "seprated"], "homepage": "https://github.com/harikt", "license": "BSD-2-Clause", "authors": [ { "name": "Contributors", "homepage": "https://github.com/harikt" } ], "require": { "hari/pw-module": "~0.0.1" } }
and add to packagist. The only things to note in composer.json is the
"type": "pw-module",
and
"require": { "hari/pw-module": "~0.0.1" }
We are all done.
Happy PhPing!
- 2
-
Hey @marcus
Regarding the module downloads, I am not sure if you noticed my earlier posts
http://harikt.com/blog/2013/11/16/composer-support-for-processwire-modules/
http://harikt.com/blog/2013/11/19/composer-support-for-processwire-part-2/
That way we can install modules on the site/modules folder as we are doing with just composer.
I am also missing how processwire will support composer in the future, if anyone can give some insights / links it may also help.
EDIT : I am happy to change the vendor name and give to processwire if Ryan likes it.
Thank you
- 2
-
Exactly . The features were actually sponsored by someone who don't wish to reveal the name .
- 1
-
Hey Horst,
The profile you need to pass is the zip file once you export the site. So it can install from old profiles. Hope that make sense.
- 3
-
> Unless i'm missing something the new command will always install 'site-default'. Wouldn't it be nice to be able to choose between the bundled profiles that ship with PW?
I don't recall, but it is not that hard if not made.
-
Hey marcus, all,
Is there anyone played with the importing / exporting of the fields and templates via json and keeping them on the module. May be we can make that a wireshell command . I was looking at continuous integration of fields and templates.
- 6
-
Hey @mindplay.dk,
I like to have a look at code, and if possible will try to contribute .
Thank you.
Like @joe_g mentioned, I was also having a similar thought of exporting the json via API and keeping on the module. And later exporting via the api than doing via the GUI .
May be we can somehow add it to Wireshell ?
- 2
-
Hi all,
I have send a PR https://github.com/marcus-herrmann/wireshell/pull/1 .
You can all play with the branch if you like.
EDIT : With respect to feedback and comments : https://github.com/marcus-herrmann/wireshell/pull/2 .
- 8
-
I will be sending a PR to wireshell .
Hope we can improve something https://processwire.com/talk/topic/9494-experimental-wireshell-an-extendable-processwire-command-line-interface/
- 2
-
Hi all,
With interest of everyone and love for Processwire, I will send a the PR to wireshell . So it will be a a one click installer.
- 4
-
Sure I will help with what I can .
Thank you.
- 4
-
@Richard ,
Sorry for I could not share for it is not yet open-sourced .
-
Modx going to make use of PSR standard and composer. Have anyone had a read ?
https://medium.com/@drumshaman/keeping-modx-relevant-part-one-42dc6632f86b
https://medium.com/@drumshaman/keeping-modx-relevant-part-two-15a37eab5b48
I do believe 3.0 should have bought some of these into lights.
- 2
-
Harmster,
May be you try this ?
session['_' . session['_token_name']]
-
@Kongondo sure. I will update here.
Quick things :
* The ok() , err() methods were changed to log to PSR-3 logger.
* All the $_POST values were changed to accept from the method. Eg dbSaveConfig($post) .
$installer = new Installer($psr3logger); $installer-> $installer->dbSaveConfig($post);
As it is not using global values like `$_POST` and `$_SERVER` all values are passed to methods. Hope this helps!
- 1
-
Yey, I was able to fix it .
Thanks guys!
-
Hi,
I was trying to build a command line installer for processwire . The script basically uses the install.php .
case 0: $this->initProfile(); break; case 1: $this->compatibilityCheck(); break; case 2: $this->dbConfig(); break; case 4: $this->dbSaveConfig(); break; case 5: require("./index.php"); $this->adminAccountSave($wire); break;
What I am having trouble is at step 5 where it tries to create the user account.
It throws an exception
Error: Exception: You do not have permission to execute this module - ProcessPageView (in /var/www/pwtest/hello/wire/core/Modules.php line 875)when
require 'index.php';
is called. Is there something special to make the `index.php` throwing without an error ?
Thank you
-
Thank you @Soma.
-
Hi @Soma,
That seems you need to be on a page right ? I was mainly looking for an option to turn on / off from the field settings.
-
Hi,
I was trying to show the system template on Selectorfield as asked over : https://processwire.com/talk/topic/9026-show-system-templates-on-selectorfield/
Is there a way to make a hook like this work?
public function init() { $this->addHookBefore('InputfieldSelector::render', $this, 'selectorField'); } public function selectorField($event) { $inputSelector = $event->object; if ($event->object->name == 'field1') { $inputSelector->allowSystemTemplates = true; $event->return = $inputSelector; return $event->return; } }
Though I did this, it seems not working properly .
-
Hi,Is there a way we can make the Selectorfield to choose system templates ?Currently I have created a Selectorfield and added to a template. Now when I create the page, the selector only shows the templates that are not system templates.I would like to show the system templates also in the list if possible.
-
Reverting back to the old version fixed it. I was trying to update with the latest dev branch.
-
Was going through the ajax request. Below is the error I have got
TemplateFile: SQLSTATE[HY000]: General error: could not call class constructor #0 /var/www/ProcessWire/wire/core/Pages.php(0): PDOStatement->fetchObject() #1 /var/www/ProcessWire/wire/core/Pages.php(229): Pages->getById(Array, Array) #2 [internal function]: Pages->___find('parent_id=1, st...', Array) #3 /var/www/ProcessWire/wire/core/Wire.php(365): call_user_func_array(Array, Array) #4 /var/www/ProcessWire/wire/core/Wire.php(320): Wire->runHooks('find', Array) #5 /var/www/ProcessWire/wire/core/PageTraversal.php(78): Wire->__call('find', Array) #6 /var/www/ProcessWire/wire/core/PageTraversal.php(78): Pages->find('parent_id=1, st...', Array) #7 /var/www/ProcessWire/wire/core/Page.php(1033): PageTraversal->children(Object(Page), 'start=0, limit=...', Array) #8 /var/www/ProcessWire/wire/modules/Process/ProcessPageList/ProcessPageList.module(178): Page->children('start=0, limit=...') #9 [internal function]: ProcessPageList->___find('start=0, limit=...', Object(Page)) #10 /var/www/ProcessWire/wire/core/Wire.php(365): call_user_func_array(Array, Array) #11 /var/www/ProcessWire/wire/core/Wire.php(320): Wire->runHooks('find', Array) #12 /var/www/ProcessWire/wire/modules/Process/ProcessPageList/ProcessPageList.module(165): Wire->__call('find', Array) #13 /var/www/ProcessWire/wire/modules/Process/ProcessPageList/ProcessPageList.module(165): ProcessPageList->find('start=0, limit=...', Object(Page)) #14 /var/www/ProcessWire/wire/modules/Process/ProcessPageList/ProcessPageList.module(109): ProcessPageList->render() #15 [internal function]: ProcessPageList->___execute() #16 /var/www/ProcessWire/wire/core/Wire.php(365): call_user_func_array(Array, Array) #17 /var/www/ProcessWire/wire/core/Wire.php(320): Wire->runHooks('execute', Array) #18 /var/www/ProcessWire/wire/core/ProcessController.php(213): Wire->__call('execute', Array) #19 /var/www/ProcessWire/wire/core/ProcessController.php(213): ProcessPageList->execute() #20 [internal function]: ProcessController->___execute() #21 /var/www/ProcessWire/wire/core/Wire.php(365): call_user_func_array(Array, Array) #22 /var/www/ProcessWire/wire/core/Wire.php(320): Wire->runHooks('execute', Array) #23 /var/www/ProcessWire/wire/core/admin.php(85): Wire->__call('execute', Array) #24 /var/www/ProcessWire/wire/core/admin.php(85): ProcessController->execute() #25 /var/www/ProcessWire/site/modules/AdminThemeThinktag/controller.php(13): require('/var/www/Proces...') #26 /var/www/ProcessWire/site/templates/admin.php(13): require('/var/www/Proces...') #27 /var/www/ProcessWire/wire/core/TemplateFile.php(169): require('/var/www/Proces...') #28 [internal function]: TemplateFile->___render() #29 /var/www/ProcessWire/wire/core/Wire.php(365): call_user_func_array(Array, Array) #30 /var/www/ProcessWire/wire/core/Wire.php(320): Wire->runHooks('render', Array) #31 /var/www/ProcessWire/wire/modules/PageRender.module(356): Wire->__call('render', Array) #32 /var/www/ProcessWire/wire/modules/PageRender.module(356): TemplateFile->render() #33 [internal function]: PageRender->___renderPage(Object(HookEvent)) #34 /var/www/ProcessWire/wire/core/Wire.php(365): call_user_func_array(Array, Array) #35 /var/www/ProcessWire/wire/core/Wire.php(320): Wire->runHooks('renderPage', Array) #36 /var/www/ProcessWire/wire/core/Wire.php(387): Wire->__call('renderPage', Array) #37 /var/www/ProcessWire/wire/core/Wire.php(387): PageRender->renderPage(Object(HookEvent)) #38 /var/www/ProcessWire/wire/core/Wire.php(320): Wire->runHooks('render', Array) #39 /var/www/ProcessWire/wire/modules/Process/ProcessPageView.module(172): Wire->__call('render', Array) #40 /var/www/ProcessWire/wire/modules/Process/ProcessPageView.module(172): Page->render() #41 [internal function]: ProcessPageView->___execute() #42 /var/www/ProcessWire/wire/core/Wire.php(365): call_user_func_array(Array, Array) #43 /var/www/ProcessWire/wire/core/Wire.php(320): Wire->runHooks('execute', Array) #44 /var/www/ProcessWire/index.php(195): Wire->__call('execute', Array) #45 /var/www/ProcessWire/index.php(195): ProcessPageView->execute() #46 {main}
Namespace problems in ProcessWire 3.0.8
in General Support
Posted
Alternatively you can import via use statement