-
Posts
344 -
Joined
-
Last visited
-
Days Won
1
Everything posted by fbg13
-
You can do it per template, by going to the template edit page and click the title field. Everything you set there is gonna affect that template only.
- 4 replies
-
- 4
-
- title field
- validation
-
(and 2 more)
Tagged with:
-
The option was hard coded to 'relative' instead of using the user set option. I submitted a pull request. Did you do anything else beside adding the comment field? It works for me on pw version 3.0.42 and php 5.5 on the intermediate profile. Make sure you don't have any typos in your code. Also when sharing code use the code button <> and add the code that way.
- 12 replies
-
- 2
-
- comment email
- comment array
-
(and 2 more)
Tagged with:
-
@JimSee The date part is a bug with PW. No idea about the error, works for me (copied your code and just replaced the comments field name). What pw, php versions are you using? Is your server able to send emails? Ask your host if you don't know.
- 12 replies
-
- 2
-
- comment email
- comment array
-
(and 2 more)
Tagged with:
-
Something inserts "/processwire/" in my form label
fbg13 replied to modifiedcontent's topic in General Support
You're missing a lot of quotes, fix those first. -
@JimSee it would help if you'd show us your code.
- 12 replies
-
- 1
-
- comment email
- comment array
-
(and 2 more)
Tagged with:
-
On the edit page of the title field, go to input tab, open the pattern field, there you can add a regular expression pattern ( [-+]?[0-9]*[.,]?[0-9]+ (for numbers with or without decimals)). Or you can add a hook and check the title before saving. https://processwire.com/api/hooks/
- 4 replies
-
- 4
-
- title field
- validation
-
(and 2 more)
Tagged with:
-
Saying that without understanding how PW works is a little rash, don't you think? Just compare PW's selectors with WP's WP Query.
-
@Dinodog probably something in the form is not valid data so the form returns an error, the problem is the form shows the same message no matter what the problem is (at least when javascript is on). Your form sends data to reeflodge.com.au/php/mail.php, probably that mail.php file is where the error occurs, you can post the code here and someone might be able to figure out what the problem is.
-
wish Routing system, aka. "Where to put page actions in ProcessWire"
fbg13 replied to MrSnoozles's topic in Wishlist & Roadmap
@MrSnoozles Why not put the code in _func.php and use if statements? if($page->name == "page-name" && $input->post->submit) { // code to run on a specific page when form is submited } if($page->template->name == "template-name" && $input->post->submit) { // code to run on a specific template when form is submited } if($page->template->name == "template-name") { // code to run on a specific template } -
Unable to create path: /.../site/assets/cache/MarkupCache/
fbg13 replied to Reid Bramblett's topic in General Support
Did you look at the error log? Might tell you something more. -
"Preventing" page refresh from submitting API form
fbg13 replied to louisstephens's topic in API & Templates
https://processwire.com/api/ref/session/redirect/ https://stackoverflow.com/questions/3923904/preventing-form-resubmission https://stackoverflow.com/questions/6320113/how-to-prevent-form-resubmission-when-page-is-refreshed-via-php -
@modifiedcontent From /wire/config.php file, to change it you add the config option to /site/config.php /** * Use session fingerprint? * * Should login sessions be tied to IP and user agent? * IP fingerprinting may be problematic on dynamic IPs. * Below are the possible values: * * 0 or false: Fingerprint off * 1 or true: Fingerprint on with default/recommended setting (currently 10). * 2: Fingerprint only the remote IP * 4: Fingerprint only the forwarded/client IP (can be spoofed) * 8: Fingerprint only the useragent * 10: Fingerprint the remote IP and useragent (default) * 12: Fingerprint the forwarded/client IP and useragent * 14: Fingerprint the remote IP, forwarded/client IP and useragent (all). * * If using fingerprint in an environment where the user’s * IP address may change during the session, you should * fingerprint only the useragent, or disable fingerprinting. * * If using fingerprint with an AWS load balancer, you should * use one of the options that uses the “client IP” rather than * the “remote IP”, fingerprint only the useragent, or disable * fingerprinting. * * @var int * */ $config->sessionFingerprint = 1; Session Handler Database, in your PW admin go to modules, install tab and there it is.
-
For each filter you have, you create a field and add it to the product template. You also add the filters page field. Now you set up each filter field to only show if it was selected in the filters page field. http://processwire.com/api/selectors/inputfield-dependencies/#example-page You can automated the creation of the fields by hooking the page save and creating a filter field when a filter page is added.
-
This is just an idea, haven't put it to practice. You would add the filters to the category pages the same way you add the categories to the product pages. And when you view products from category X you get the filters from that category page and maybe it's children, if any. Product A is in category X, which has the following filters: color, size, weight. View category X, available filters color, size, weight.
-
The field I tested was also on the user template. Check if you mistyped the field name when you created it.
-
I just tried it and it works both with 0/1 and true/false. Have you tried the code as is without any conditions?
-
500 Internal Server Error error while installing processwire
fbg13 replied to Chamche's topic in Getting Started
@Chamche No, the first screenshot is the error log, but you only show a part of it (notice the scroll bar). Just copy everything on that page and use pastebin to share it. Or on cpanel's file manager download the error log file, zip it and attach it to your post here on the forum. -
500 Internal Server Error error while installing processwire
fbg13 replied to Chamche's topic in Getting Started
@Chamche I have seen the screenshot the first time, but it is useless. If you look at it you'll see the errors are from 25 May and it's the error caused by the php version, which was fixed by upgrading php. We need to see the rest of the error log where the new errors should be. -
500 Internal Server Error error while installing processwire
fbg13 replied to Chamche's topic in Getting Started
@Chamche post the error log, either pastebin or attach it here. -
500 Internal Server Error error while installing processwire
fbg13 replied to Chamche's topic in Getting Started
@Chamche show the end of the error log, or just copy paste it to pastebin or similar. LE: also php 5.4 is pretty old too http://php.net/supported-versions.php -
I can't initialize the processwire install from browser
fbg13 replied to Chamche's topic in Getting Started
You probably are using php 5.3 or lower. Change hosts or ask the current one to upgrade. -
I can't initialize the processwire install from browser
fbg13 replied to Chamche's topic in Getting Started
Could be an ownership problem. -
Are you sure you are logged in? If you're not logged in it saves to the guest user. $u = $users->get("username"); username should be the name of the user you want to edit/save. If this are not the problem I don't know. If you test this on a server I could take a look, if you're ok with giving me access.
-
@Thor that's because $u is empty , unless you assign an user object to it. $u = $pages->get("template=user, name=username"); // or $u = $users->get("username"); And with your other example above. Are you logged in while running that code? Did you add the my_planet field to the user template?
-
I gave you an example in my second reply.