-
Posts
6,798 -
Joined
-
Last visited
-
Days Won
158
Everything posted by Soma
-
Module HelperFieldLinks - field and template edit shortcuts
Soma replied to Soma's topic in Modules/Plugins
Ah yes the module inits on page edit screens. I don't see any errors. DO you mean the array to string conversion notices martijn tells about? I'm not seeing theses notices anywhere so wondering what PHP version you see them? For me it just output "Array" where there is a array in $data_value... So that means my previous try to fix doesn't remove the notices? Ah yes there still seems to be settings that are arrays. The editRoles etc are on template field not? The fix you posted is simple but would just show the ids of the roles, and I would like to output title and links as with parent_id or template_id. I will try to catch the roles also, hope that there's isn't much more. And leave a implode in there for those missing in case. -
After having a problem with floats, we found out that all the PHP float and number function aren't locale save and compatible. We have a language support installed and the german locale is set via the language pack, after that the float fields stop working correctly. After removing the locale they work again. It's simply that the locale puts the float like "9,13" and not "9.13" and it fails. It would require some more workarounds as there is now to make it work or just leave out the locale setting when using languages, which is kinda annoying not able to use it.
-
right $me->is("have-fun")
-
good one I also wrote about in some thread... and for those being even more lazy can also use the even shorter $page->is(selector) if($page->is('template=template1|template2|template3|template4')){ edit: or if just for one template instead if($page->template == "basic-page"){ use if($page->is("basic-page")){
-
Just for the record and for those wondering what $event->replace = true; does: It prevents the hooked function to get executed when you use addHookBefore().
-
Heh, I once tried for ages to use "status<Page::statusHidden" in a selector string... BTW where is the if ($this->page->template = 'template-name') { gone?
-
This would be a good candidate for a simple custom field, nuff said.
-
not as a string should work... $page->addStatus(Page::statusHidden); Cheers
-
how about public function preservePages(HookEvent $event) { $event->replace = true; ... Thanks for the beer. Really strange that you can't just remove permission to delete pages, for what reason? Feels weird when deleting page and it just gets hidden.
-
"This page has no Process assigned." with lastest dev and some modules
Soma replied to maba's topic in General Support
Hmm, not sure really. But the "edit" or "install" part works? Wouldn't make sense. What you mean with "Only once!" ? Here some more you could test. 1. make the getActions method public or protected instead of private. 2. try make the $this->modules->get('InputfieldMarkup'); => wire("modules")->get('InputfieldMarkup'); 3. throw the computer out the window -
We already got through this guys .... Here http://processwire.com/talk/topic/4189-flexibility-in-page-design/?p=47083 and here above on this page http://processwire.com/talk/topic/4189-flexibility-in-page-design/?p=47085
-
"This page has no Process assigned." with lastest dev and some modules
Soma replied to maba's topic in General Support
I'm not sure I understand what you're posting here last two posts. Anyone? Since I can't reproduce nor see any wrong code I can't really do anything... also it looks like you're the only one experience this. Anyone? -
"This page has no Process assigned." with lastest dev and some modules
Soma replied to maba's topic in General Support
Can you enable debug mode in site/config.php and see if there's any error/warnings? Or if nothing in PW error log or apache error log? If you said $button = $this->modules->get('InputfieldMarkup'); is the problem, which shouldn't at all, can you look if the InputfieldMarkup.module exists in you /wire/modules/Inputfield/ ? Or put this code in a template file and call the page and see what happens? $button = $modules->get('InputfieldMarkup'); $button->value = "<a href='#'>markup test</a>"; echo $button->render(); if that fails there's no problem with MM but your PW install. But then looking at you screenshot the other button made the same way work, so I'm confused. -
"This page has no Process assigned." with lastest dev and some modules
Soma replied to maba's topic in General Support
I don't think phpinfo will help with permission problems if there's any, but then I'm not sure anymore what problems you currently have with PW or ModulesManager... Generally it's usually a permission problem when writing or reading files fails, and it's not something I can do anything about, at least I'm not aware of and most of the problems with php setting is already covered by the MM module to throw an descriptive error. I'm no guru when it comes to permissions and what all can go wrong on all those hostings and combinations of settings. Huh? What problem? Any more infos? Errors? I don't think there's any problems with any of the above, nothing wrong here, not something I can say Ahhhh.... I think you have other problem with you general PW install, like some missing files if the $this->modules->get('InputfieldMarkup'); has a problem cause there's nothing wrong with it. -
how to delete a page in page field [Multiple pages (PageArray)]
Soma replied to leoric's topic in API & Templates
I just looked into this again and there's no argument for removeAll() just for remove($key). See here in source https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/core/WireArray.php#L790 removeAll() removes ALL pages from a Wire/PageArray (pages, images, POST vars etc). So I'm not sure about why it works for you because it shouldn't and also doesn't work for me. Assuming user_app is a page field allowing multiple pages to be selected. It's a WireArray/PageArray and you add pages to it like this from API: $user->of(false); $page1 = $pages->get("/somepage/"); $page2 = $pages->get("/someotherpage/"); $user->user_app->add($page1); $user->user_app->add($page2); $user->save(); Now we got 2 pages added to the page field. If you now do a $page->user_app->removeAll($page1) they all get removed so does $user->user_app->removeAll(); But if you do: $page2 = $pages->get("/someotherpage/"); $user->user_app->remove($page2); $user->of(false); $user->save(); Now only the $page2 which is in the array gets removed. It works all as expected and make sense. -
Added new #processwire module: TemplateNotes to add custom instructions for editors http://t.co/LqxaqrME0N
-
Lol Front-page? Ok Hope the concept is nice as it allows for simple setup and use html or markdown. I added module to directory and created a new thread. Im on mobile so too lazy to link to now.
-
Template Notes Adds a "Help" tab to pages for notes and instructions on the current template used. You can add content by simply putting a html or markdown file in /site/templates/notes/ the module will automatically load that file if it finds one and adds a "Help" tab to the page edit form. Name the files using the template name. You can use html or markdown to write the help text. - /site/templates/notes/[tplname].html - /site/templates/notes/[tplname].md To style the content you can specify a custom css file url you add to the module settings. http://modules.processwire.com/modules/template-notes/ https://github.com/somatonic/TemplateNotes This module was quickly written after seeing a wish-list request by Joss http://processwire.com/talk/topic/5016-help-tab-for-template/
- 13 replies
-
- 22
-
There you go https://github.com/somatonic/TemplateNotes
-
If you give me another 10 minutes I got something for you...
-
Ehrm, but you'll need some sort of module anyway . To have a field read only there's no special module required. But what you want there's no way to do it without additional coding and that's a good example for a simple module. Template Decorator does allow this and many more: http://modules.processwire.com/modules/template-decorator/ It is not for full essays but just a short description of what this "template" does that shows at the top of the content tab. The module would also be a perfect reference for how to do what you want.
-
"This page has no Process assigned." with lastest dev and some modules
Soma replied to maba's topic in General Support
No problem maba, we are all only humans. As said, simply updating PW wouldn't do anything what you mention. I've run so many updates and rollbacks of PW and never experienced anything like that. It would be also good to know what you did update, from what to what version. Also sometimes not sure what you mean with updating, or installing as you don't tell "what". The bug in ModulesManager only ever happened if you uninstall MM and reinstall it. -
"This page has no Process assigned." with lastest dev and some modules
Soma replied to maba's topic in General Support
I have a hard time to understand what you saying with all the problem you got. Updating PW (means replacing /wire/ folder only) does nothing you mentioned like loosing processes for admin pages or problems with ModulesManager. Now that we are on ModulesManager. As Ryan says I'm not sure what the problem is for your install, but looks a lot like a memory or max execution time for scripts, which is a php setting. I never experienced any issues like you mention so I can't really see what's happening. Surely removing other modules in this case wouldn't help or do anything related to that particular issue with ModulesManager. -
"This page has no Process assigned." with lastest dev and some modules
Soma replied to maba's topic in General Support
I'm not sure what about the cache file of ModulesManager. It only checks for assets and modules folder to be writeable, but cache should already be writeable. After all the cache folder gets created by PW (php) when installing. So only thing I can imagine is some permission issue on your server. Maybe you have created or uploaded the folder with ftp and it conflicts with php owner rights. Hard to say but all possible. For the missing process: Looking again at the ModulesManager install, uninstall methods, there's definately a bug when uninstalling the module (never done that really ) The setup/modulesmanager admin page won't get deleted but should. After installing it again it finds the still existing admin page and doesn't assign a process of course. Thanks for mentioning, I will fix this later. -
No, with WordPress