-
Posts
144 -
Joined
-
Last visited
Everything posted by Lars282
-
Any chance that the second submit button is not available anymore in the latest dev? Checked the ProcessPageEdit module and believe that in lines 362 to 366 the "field2" should actually be "submit2"? If this is changed, the button is back.
-
Currently, it only seems possible to select one field as a label for the list of pages to choose from via any selector for a field type page. It would be great if this could be extended to also show what was already chosen as a default display for the page tree, or, potentially one step further, include a config field similar for choosing the default display in the page tree. Edit: as mentioned by gebeer, this can be achieved by using the Fieldtype Concatenate (https://processwire.com/talk/topic/8217-name-format-for-children-based-on-any-field-not-just-title/?p=79735). Though it would be great if already as a default one could choose the same label as used in the page tree without the need to create an additional field.
-
Not sure if this is already reported or intentional: when adding a new page using the latest dev, the result of the check if the entered page name is already taken displays between the field name "Name" and the "*" for mandatory (see screenshot). It seems a bit confusing to have the "*" in a separate line below, maybe this should still be shown after the "Name"?
-
Name format for children based on any field (not just title)
Lars282 replied to Lars282's topic in General Support
More or less, yes! Can I use the existing $parent->template->childNameFormat attribute for this? It seems like a logic extension of the already available functionality. It is already working for the title field and I would want to extend this in two ways: (1) allow any field to be used (2) allow multiple fields to be used, i.e. concatenated with a '-'. When I simply try to "misuse" the Child Name Format field to store a comma separated list of fields to be used by module, the temp pages created before the fields are filled have a very strange name, e.g. "am00000030092014sun-09-nov-2014-09-30-12-0000_sundayam123011am11europe-london-am00000030092014sun-09-nov-2014-09-30-12-0000" As a workaround, I have now adjusted the Pages core process from line 721 (e.g. here: https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/core/Pages.php#L721) to read as follows (lines 727 to 729 added by me): if(strlen($format)) { // @todo add option to auto-gen name from any page property/field if($format == 'title') { if(strlen($page->title)) $pageName = $page->title; else $pageName = $this->untitledPageName; } else if ($format == 'author_lastname,author_firstname') { if(strlen($page->author_firstname) || strlen($page->author_lastname)) $pageName = $page->author_firstname . '-' . $page->author_lastname; else $pageName = $this->untitledPageName; } else if(!ctype_alnum($format) && !preg_match('/^[-_a-zA-Z0-9]+$/', $format)) { // it is a date format $pageName = date($format); } else { // predefined format $pageName = $format; } } else if(strlen($page->title)) { $pageName = $page->title; } else { // no name will be assigned } This seems to work exactly as required ... obviously not yet dynamic. Is there a way to achieve this behavior with a module, so that I do not have to adjust the core after every update? Ryan mentioned in a code comment that it was still a todo to make this work, so a module would only be required as a temporary solution. Thanks a lot Lars -
Name format for children based on any field (not just title)
Lars282 replied to Lars282's topic in General Support
Instead of deriving this from the title field, I want to use any other field that the child template has ... but this does not seam to work. -
Is there currently a way to base the name of a page on a field other than the title? I am not using the title on multiple templates (e.g. profile pages don't really have a title but fields for first name, last name, etc.). In this case it would be great to base the name derivation on a different field / combination of fields. If this is not possible by default, could this be done with a module? Thanks a lot Lars
-
In general, everything works fine - the website is up and running after the migration. Still, I get this email every couple of weeks / months, but even when I try to access my website immediately, everything seems to work. I have a different website with the same hosting provide that does not give me these errors ...
-
Hey all, Since the last migration of a PW website to a new hosting provider, I keep receiving the following error notifications per email every couple of weeks / months (very rarely): Any idea why this could be? Does it mean that the SQL server of my hosting provider is temporarily down? Many Thanks Lars
-
Is there already a planned release date for lister pro?
-
I would need users to be able to edit both published and unpublished pages, but not to publish them. Adrian, I saw you mentioned you had an idea but didn't need it back then - have you implemented something like this in the meantime?
-
But by looking at this, I would not have found out that page-publish is a role that I can just create and that it works as required. What logic does it follow? Are there other page-xxx permissions that I can simply create and use?
-
Thanks, apeisa. How could I have found this out myself? Is there a list of all implemented or considered permissions?
-
Hey, On a new page I would like to have a separate edit and publish permission, i.e. some users can add pages, but not publish, and some other users will then have to publish the new pages. Is this easily possible? Many Thanks Lars
-
Ops - didn't fully read apeisa's reply ... Thanks for your help Lars
-
Can't seem to get this to show - could you have a look at the screenshot attached if you can see where I go wrong? Thanks Lars
-
I guess I am just to stupid to find it ..... ! Where will this option become available? Do I need to activate a module first? What do I need to do in order to have names set automatically for pages below a defined parent? For the parent template, I have only selected one template that is allowed as a child, but cannot find the name format for children option. Thanks Lars
-
Hey all I would like to skip the "Add New" step where users manually need to enter a page name for some templates. I have found this http://processwire.com/api/modules/process-template/, where it says it should be possible in the template settings when you only allow one child. Is this a module? If so, where can I get it? I can't seem to find this in the modules list. Or is it already part of PW core? Thanks for your help Lars
-
Yes ... that is why we only want to use the url without www. If something is wrong with the DNS, how can it be though that the domain works without www but points to the wrong IP if www is used? In the DNS settings, we have both domain and domain with www pointing to the same domain using an A record. I had already asked my provider, if something could be wrong with these settings, but they apparently did not find anything. Thanks for your help! Lars
-
I had already tried enabling the "optional" part in the htaccess file to always use www, but it also did not seem to consistently solve the issue as sometimes it would not redirect. I would prefer not to use the www but rather try to fix the underlying issue of why it doesn't work without the www...
-
Hi all, Since recently, I am having a problem accessing my website without www. When accessing it without the www, it gives a 403 error most of the times (see http://www.webproxy.net/view?q=http%3A%2F%2Faglobalvillage.org%2F), while when accessing it including the www, it works fine. I had recently migrated hosting servers and the title of the 403 page seems to refer to the old hosting provider. I am pretty sure that it was working correctly for a while after migration. Unfortunately, my hosting provider could not help me so far, nor could I find anything. Any ideas what the issue might be? Could there be any references in PW config files to the old website? The rewrite base in the htaccess is not being used. Thanks a lot in advance Lars
-
Thanks, SiNNut. This did the trick: https://processwire.com/talk/topic/4917-the-admin-cannot-be-reached-in-new-installation/?hl=subdirectory#entry47780
-
Hi all, I am in the process of migrating my site to a new hosting provider. My plan was: Install PW at new hosting space Copy site directory and DB Switch domain over PW is now installed at the hosting space and the example homepage works fine: xx.xxx.60.250/~aglobalv/. But I get 404 errors when trying to access anything else, e.g. http://xx.xxx.60.250/~aglobalv/ or even the admin. Where did I go wrong? What do I need to do in order to get PW running even at a lower level directory? Thanks a lot Lars
-
Thanks Soma, the first thread helped! Somehow didn't find this when searching myself...
-
Hey, How do I delete an image? I just gave $user->user_photo->remove() a go, and accidentally deleted the entire user ... Basically, I wan to replace the old image with a new one, though $user->user_photo = new simply adds the new one, still keeping the previous ... Thanks Lars
-
Thanks guys! For potential privacy issues, I want to randomise the filename, ie not keep the original one. If I use setTargetFilename(), with timestamp and extension from pathinfo(), as well as setOverwrite(false), will PW append numbers to avoid override? EDIT: And is there a simple way of dealing with multiple uploads in the same way?