-
Posts
11,260 -
Joined
-
Last visited
-
Days Won
374
Everything posted by adrian
-
I think the issue is just your single quotes - it is looking for "$answer_text" as a string, rather than "Yes". EDIT: Have a good read through some of these links to get a better understanding of the differences between single and double quotes: https://www.google.com/search?q=php+single+vs+double+quotes
-
I would suggest that you should store it in this format : 2014-03-19 17:20:10 which is the standard datetime format in mysql. PW does all its conversions from this and you can easily do the same with PHP's date function. Keep in mind that you need to convert from this to unixtime using strtotime before using php date. So, you can convert from RFC3339 to store in PW like this: $pw_date_format = date('Y-m-d H:i:s', strtotime("2014-03-27T17:00:00.000+01:00")); and then take that and add 30 minutes and convert to RFC3339 $RFC3339 = date("Y-m-d\TH:i:sP", strtotime('+30 minutes', $pw_date_format)); You could also make use of PHP's DateTime class: http://www.php.net/manual/en/class.datetime.php
-
Another pretty major update! There is now an "Edit Imported Content" option during the import process that lets you determine exactly which fields and pages (from the JSON) get imported. This should come in especially handy when importing the one of the Shared JSON packages. I have added a new one that is a good test for this, called "person" (maybe needs a more detailed name), that creates a person template with a complete range of contact/address fields. So, on import you can easily choose only the fields you want from the package. I think this should be really handy for distributing standard templates, but with easy customization for each use case.
-
If you google that error there are a few possible php.ini settings that might help. Certainly not an issue specific to PW. If you're still having trouble after trying some of the google advice, then this is a question for your host.
-
Macrura is correct - PW needs mod rewrite. Don't give up so easily on the 500 error - there are lots of possible causes of this and lots of easy fixes - you just need to figure out which one is the issue with your particular hosting environment. If you have tried all the rewrite base options, including matching it to the path of your site on the server, then you might next try: #SetEnv HTTP_MOD_REWRITE On http://processwire.com/talk/topic/1962-cant-reach-admin-page/?p=49524 Or this: http://processwire.com/talk/topic/2439-htaccess-issue/?p=39674 If that doesn't work, take a look through these search results: https://www.google.com/search?q=site%3Aprocesswire.com+500+error&oq=site I am sure we can help you figure it out.
-
What you're looking for is: inputfieldClass The easiest way to figure these things out is often to use your browser dev tools. I actually didn't know this initially, but a quick right-click > Inspect Element on the select field under Inputfield Type, revealed the name of the select as: inputfieldClass
- 2 replies
-
- 3
-
-
- api
- FieldtypeTextarea
-
(and 1 more)
Tagged with:
-
I can't replicate the comma issue here either, but I am guessing it is something to do with the number formatting settings on their OS or in Safari specifically. I have a couple of solutions for you try with your customer. In InputfieldPhone.module on Lines, 75, 80, 84, 89 can you try the following. Firstly, add: pattern="[0-9]*" to each of the input tags. If that doesn't work, try changing the input type from "number" to "tel" tel makes most sense here, but according to: http://www.w3schools.com/html/html5_form_input_types.asp it isn't supported by any browsers yet. Sounds like it might avoid the issue anyway, because the lack of support at least means that Safari won't think it's a number and try to add the comma. Let me know if either of these work and I'll make the changes to the module.
-
Glad to hear, but why not upgrade those old installations to 2.4 ?
-
On the permissions question, there are several modules that extend these capabilities in PW: http://modules.processwire.com/modules/page-edit-per-user/ http://modules.processwire.com/modules/page-edit-field-permission/ http://modules.processwire.com/modules/page-edit-per-role/ http://processwire.com/talk/topic/5354-usergroups-module-in-development-groups-page-based-permissions/ Hopefully something in there will be useful for you.
- 30 replies
-
- 2
-
-
- Drupal
- get started
-
(and 1 more)
Tagged with:
-
On a roll - after a chat with Joss, I have added a new option on export that allows you to select any additional required helper files such as .inc, .css, .js, etc. These selected files will be packaged in the zip for the migration. This option is only displayed if you choose "save" because obviously not relevant to "copy" where it's only the JSON that can be exported. Note that there is no need to select normal template files as these are still included in the export automatically.
-
PW not installing correctly - admin not found
adrian replied to Jamie Gordon's topic in Getting Started
Hi loook and welcome! Have you seen this posts on PW and nginx? http://processwire.com/talk/topic/5733-official-nginx-support/ http://processwire.com/talk/topic/275-processwire-on-nginx/ Maybe something there will help you get going.- 27 replies
-
- admin
- processwire
-
(and 3 more)
Tagged with:
-
I love managing linux servers, and I have wanted to run a linux desktop for a long time, but Adobe has been the stumbling block for me. Illustrator is the main issue, but InDesign and Photoshop are also key things I can't really do without. It's a shame really because I think there are decent linux alternatives for just about everything else.
-
Ok, I have fixed another round of bugs, including one weird one getting an "Unknown column 'field_images.modified'" error when importing a page tree into a brand new install before ever having viewed a page on the site. Getting off track, but the issue was due to the need to trigger getDatabaseSchema on the images field which adds the modified and created DB fields. The things I've done is add optional support for migrating createdUser/modifiedUser and created/modified datetime for pages. I am using quiet save which is supposed to support createdUser, modifiedUser, and created, but it isn't supporting modifiedUser for me at the moment. I might resort to SQL, or I might decide it's actually best to just change the created versions and leave the modified to change to the user running the import and the current time. On the user migration - if a user doesn't exist it will be created and assigned its roles from the source installation as defined in the JSON. Also, if the needed roles aren't available, they will be created too. Let me know how it goes for you!
-
Hi leroj, Should be no problem at all.
-
Hey Ryan, I just came across this issue on the latest dev version - presumably with stable as well. I ended up going with your fix for now, although for anyone stumbling across this, the Yes and No need to be reversed in the ternary operator.
-
Pages Web Service query doesn't find result
adrian replied to verdeandrea's topic in General Support
You can use commas like that. Sorry, I was looking at the returned selector and was thinking you were using that in the url. I would still do as apiesa says and just load the url initially in your address bar directly and see if you are still get the tilde/underscore issue. Have you tried the returned selector in a normal template file, or in Nik's Selector test module to make sure you are actually getting the results you expect? -
No problem - I wasn't much help Always disconcerting when a db spontaneously loses data - good luck with the sleuthing!
-
Is there any chance that some of the files in the PW wire folder could have been deleted? You could try replacing the entire wire folder with a fresh copy - that might be a good place to start? Sorry, hopefully someone else will have a better idea
-
Hi Jennifer, It sounds like the repair worked on the tables. The member function error on $user->roles makes me think you have a session issue - maybe? Have you tried emptying your assets/cache folder? Really not sure, but maybe worth a try. Can you access the admin, or is the entire site down?
-
Vineet - it's all about variable scope. $pages (or any of the other PW variables) can't exist inside a function like that. You need to use: wire('pages')->get or define $pages = wire('pages') at the start of your function and then you can use: $pages. Nevermind - sorry, apparently I didn't actually read your post Looks like renobird's suggestion should be spot on!
-
This post from Soma, might be a great place to start: http://processwire.com/talk/topic/3634-down-uploads-on-a-per-user-policy/
- 2 replies
-
- 2
-
-
- protect files
- form
-
(and 1 more)
Tagged with:
-
get search result pages parents(advanced search)
adrian replied to leoric's topic in General Support
leoric, I think we are all struggling to know exactly what you mean without knowing your page structure fully. In your first post you say to want to get the page's parent from the search results. The problem is that your results may find pages with different parents. The only way to get the parent is to do that on one page. Perhaps you need to rethink how your search works. Would it perhaps be better if the initial search term actually only looked at the category field for each page? Another possibility would be do have a multiple option search like the skyscrapers demo (as noted above). There are lots of options, but perhaps if you can detail out your site structure a little better, using actual content examples, like the shirts idea, we'll be better able to help. -
Turns out I really broke some keys things when I added the import actions functionality (for append, overwrite, replace). I need sleep now and won't be able to get to this again for at least a day, maybe two. So, the most stable version right now is probably: https://github.com/adrianbj/ProcessPageTreeMigrator/blob/019e006833ad970263533516aa7615b8c87af573/ProcessPageTreeMigrator.module Of course this doesn't include the fixes for the PHP warnings that teppo found, nor the directory writing checks etc. Anyway, I'll post again when the import actions additions are working properly.
-
Hey Marty, anything for you Do you mean automatically or manually on a regular basis? Manually will be no problem at all - that is what this is designed to do (once I get a for more of the REPLACE kinks sorted out). If you want automatic replacement, I am sure we could use a cron job to handle both the export and import - the key thing would be to save the zip on the server, instead of downloading it to local machine. Then get the zip from the destination server and trigger the import. All sounds do-able. That said, if it is just content we are talking about and no fields or templates would change, then I wonder if an import from a web service feed might not be a better approach - this could even bring across new images. I'll sleep on it!
-
Hey Ryan, A couple of quick suggestions for the debug mode tools PDO queries section. First one should be simple - force queries to wrap so they aren't truncated. I know they are still there and can be viewed in the page source, but would make life easier still. Along with break-word etc, I actually quite like how it looks with white-space: pre; as well, although it does make for a long page The other thing might be more difficult - any chance you could decode the bindValue of the variables so we can see what is actually being queried. I haven't looked to see how/when this debug table is built, so maybe this isn't possible, but it sure would be helpful!