Jump to content

benjaminE

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by benjaminE

  1. PHP version is 5.6 on both The chmod on the wire/modules/ directory is rwxrwsr-x (775), as are all the other directories and files within it (that I looked at).
  2. I've just updated a site from version 2.7.1 to 2.7.2. This worked fine locally, but when I repeated the process on the staging site, I get a list of errors when I log in to the admin control panel. They're all begin with: Modules: Configurable module check failed for FieldtypePage, retrying... I've attached a screenshot of the full list. The site/assets/logs/modules.txt file shows similar warnings. But the site seems to work fine otherwise. Does anyone know what might be going on here and how it could be resolved? Many thanks!
  3. I have a repeater field which contains a textarea field powered by the CKEditor. It works fine under normal circumstances. However, if I change the order of any of the repeater blocks, any text that has been entered into the text area disappears and the text editing area of the CKEditor becomes unresponsive. If I click on one of the buttons of the editor, it works but I get a JS error gets logged in the console which reads: Uncaught TypeError: Cannot read property 'getSelection' of undefined ckeditor.js:386 This is happening in the latest versions of Chrome, Safari, and Firefox and I'm running PW version 2.5.3 Any thoughts on how to resolve this would be super helpful! Many thanks, ben
  4. Awesome, thanks so much for all the help. I've have a look through them all properly and see which one is best. b
  5. Is there any way to disable a user from being able to edit the Name field - that is the field that determines that page's URL? I've hidden the title field, so that can't be edited. I know you disable editing of a page, which would solve this. However, disabling a role from editing a page stop that role from being able to sort its children (see here) and I do want to keep that behavior. Any advice would be kindly appreciated! b
  6. Many thanks for your help horst. If I understand correctly, the first method you mention doesn't allow custom ordering of pages. But the second solution, with the module, does....
  7. Is there a way to have new children appear at the top of the list of children when they're first created (rather than at the bottom) whilst also allowing the user to do custom ordering? I seem to remember seeing this option somewhere but I can't find it. Perhaps I'm misremembering! Many thanks in advance!
  8. Hi Craig, Thanks for your reply and very helpful clarification. And it's great to hear you've found a fix for the problem. However, I thought I was using the latest version of ProcessWire... Is the development version different from "the latest stable" version that's on the GitHub page? If so, do you know where I might find it? Many thanks, ben
  9. I've recently had to install a couple of processwire sites on a cloud hosting service (TSO Host) and have had the same issue arise on both occasions. What happens is that when you try and access any page of the site, an error message - "Unable to complete this request due to an error. Error has been logged" - is displayed. Inspecting the log revealed this particular error: 2013-12-03 05:23:34 ? http://rebeccacharlton.com.gridhosted.co.uk/?/ Error: session_start() [function.session-start]: Failed to initialize storage module: memcache (path: ) (line 104 of /var/sites/r/rebeccacharlton.com/public_html/wire/core/Session.php) A simple fix I found on these forums was to comment out line 155 on the root index.php file: ini_set("session.save_path", rtrim($config->paths->sessions, '/')); But I was wondering whether there might be a more thorough fix than this... I think the problem stems from the fact that on cloud hosting, the root isn't the simple root because you're on a shared server with many other sites. One attempt to solve the problem was to find the true root using: echo $_SERVER['DOCUMENT_ROOT']; and then replacing the "/" on line 155 with the result but this caused the same problem as before. Only commenting out the line entirely worked as a solution but this feels somewhat like a compromise. Any help to resolve the issue would be much appreciated! Many thanks in advance, ben
  10. Thanks for the clarification arjen. Soma: here's the error log I think: 2013-09-18 11:48:42 ? http://www.shootcuba.com.gridhosted.co.uk/?/ Error: session_start() [function.session-start]: Failed to initialize storage module: memcache (path: /var/sites/s/shootcuba.com/public_html/site/assets/sessions) (line 104 of /var/sites/s/shootcuba.com/public_html/wire/core/Session.php)
  11. Hi Soma, thanks for getting back. Unfortunately the site is being hosted on a cloud server and the error logs are not really accessible...
  12. I just realised it might be relevant to mention that I'd installed the ModuleManager module and that there was a file in the cache folder called ModuleManager.cache Might it be that this is necessary? Previously (and when the ModuleManager hasn't been installed) I've emptied the cache with no problem...
  13. Hello, I was having some trouble installing modules (they weren't showing up in the module manager) and so I deleted the contents of the folder site > assets > cache in the hope of fixing this problem. However, having done this any page I try to navigate to on the site (including the root /index.php) throws up a 500 Internal Sever Error. Does anyone have any idea about what might have gone wrong here? It's slightly worrying... Many thanks in advance for any help. b
  14. Thanks for all your responses and apologies for not being super clear. An example would be useful, agreed. So here goes... Let's say I want to create a group of fields which would compromise an article - headline, body, image - and I want to be able to insert this article "chunk" into any given template. A repeater would do the job here, except in this instance I don't want the user to be able to add more than one article (which is what a repeater does best). A repeater is so close to doing exactly what I want, I just wondered whether there was a way to limit the iterations to 1 (like you can with an image field). This would basically solve the problem. I believe adamsprujit has understood what I want and what Ryan is building does sound good, but repeaters are already so close! Pete: the reasons I want to do this with a repeater-like field rather than simply adding the fields one-by-one to templates are: (1) As adamsprujit says: it makes outputting in the template neat, (2) It makes adding the fields to the template quicker, and, (3) It means you don't have to create lots of fields... Say you already have a headline field - essentially a basic text field - and you're already using it in a template, you can re-use it in the same template if it's in a repeater. You don't have to go and make another field - eg, article_headline - to use for the article. I hope that clarifies things. Any thoughts?!
  15. Hello, Is there a way to group together fields, like in a repeater field, but only allow there to be one set per template? I looked into the fieldtab field but this doesn't allow for certain features that a repeater would - ie, allow the same field to be used at least twice within a page (eg, outside a repeater and within a repeater), and to add a group of fields into a template as one chunk. This would seem like a handy feature feature and I'm probably missing something! Many thanks in advance, ben
  16. ** UPDATE ** This problem resolved itself. I'm not sure how but I perhaps there was a delay between the files appearing on the FTP server and ProcessWire recognising them...
  17. The processwire site I am currently building has recently stopped recognising the addition of new modules. Last week I successfully managed to install the CropImage module, but now every new module I add to the site/modules/ directory is not being recognised by the module manager. When I click on the "Check for new modules" button, I'm told that there are "No new modules found". I'm pretty certain I'm following the installation steps correctly and I've tried the process with several (well established) modules. Is there any obvious reason why this would have stopped working? And more importantly, is there anything I can do?! Many thanks in advance. b
  18. That's perfect, thank you! I'm fairly new to PHP (more of a JS knowledge) so these kind of things are still new to me. But very useful to learn. So thanks! b
  19. Hello, Is there any way to resize images using processwire and PHP so that a maximum long edge value is respected? For example, I would like it so that landscape images are resized to a maximum width of (say) 900px and portrait images to a maximum height of 900px, and in both cases the second dimension adjusts to maintain the natural aspect ratio. Can this be done with processwire? Many thanks in advance, b
  20. **EDIT** The problem is solved. I basically hadn't upload all the relevant files for the module. Basic error, my apologies. ps It's a very good module, I'm happy! **//EDIT** Hello. I've just started using this promising-looking module on the latest build of ProcessWire but I'm having some problems fairly early on. I installed the module as instructed. Created a new Image field. Change the Inputfield type to CropImage. Set the maximum file uploads to 1. And added this field to a template. Now when I try and add an image to this field in the page-edit dialogue I get the error message as pictured in the attached image (in short, it says Method PageImage::getThumb does not exist...) Am I doing something wrong here? Any thoughts on a solution? Many thanks in advance. b
  21. Hello, I recently installed a version of ProcessWire on a site which was still running with a static index.html file. So as not to disrupt that while the installation and set-up were underway, I changed the index.php file in ProcessWire to _index.php. The set-up worked fine (apart from the warning at the end they the installer couldn't find the index.php" file). And the site seems to run fine if I navigate to mysitename.com/_index.php However, when I change the name back to plain old index.php, I get the error message: Warning: strpos() [function.strpos]: Empty delimiter in /home/content/49/7349449/html/BE/_index.php on line 50 Might anyone have any idea how to fix this? I've looked in the various config files for someplace where that _index.php might be logged, but no cigars. Thanks in advance for your help. ben
  22. @nik: I'm using ProcessWire 2.3.0... One issue here might be that the parent page is set to "Hidden" and uses a template with no corresponding template file (I don't want the children to be accessible through their own pages). However, this wouldn't explain why plugging in the parent with 4 children outputs only "1"; both the parent and the children here are not hidden and have templates with corresponding files. I'm afraid my ProcessWire skills are not good enough to probe deeper into diagnostics but I'd be happy to answer any more questions if they'd help find a solution... Perhaps useful as your proposed method might come in handy for other applications that require more subtlety than just checking if any number of children exist.
  23. Thank you both for your prompt and good replies. I've gone with Diogo's second option and it's worked perfectly, thank you. Nik: I like the elegance of your second solution but I can't seem to get it to work. I tested the output of: $childCount = $pages->count("parent.title=previous caption winners"); But it came out with "0" despite the fact that there are 2 children of that parent. When I switched the parent title to another with 4 children, it outputted "1". I've no idea why this might be happening... Thanks again to both of you though.
×
×
  • Create New...