Jump to content

ryan

Administrators
  • Posts

    17,132
  • Joined

  • Days Won

    1,655

Everything posted by ryan

  1. What are the settings on that page reference field? Usually when you've got a timeout, there is some circular reference. For example, a repeater referencing a category page that in turn somehow references back to the original page. Or a page reference in a repeater that references back to the parent page or repeater items. ProcessWire detects and prevents most of this, but the question becomes more complex when a repeater is involved. What were the last edits you made before the timeout started occurring? I don't think it's an issue of quantity, I really think there must be some kind of circular reference in there, especially given that a Page reference in the repeater. You may be able to track it down by editing the repeater pages directly: Page List > Admin > Repeaters > drill down to it from there.
  2. Looking good Arjen! I've not used MailChimp so can't get too deep into it since I don't have the platform to run it, but a quick look at the code and it seems like you are on the right path. Actually I probably should use Mailchimp since they are just a few miles from my house, and they gave me a nice t-shirt. Having some nice PW integration makes it very enticing! I think that you had it right the first time with $this->config->urls->NewsletterMailChimpSync (rather than paths, which represent server disc paths, not relevant to stylesheet links). However, if you add parent::init(); to your init() function, and name your CSS file (or JS file) the same as your module name, then ProcessWire will load them for you automatically--this is the preferred way to do it.
  3. For safety, good to sanitize the categories before putting them in the selector too: $selector = "id="; foreach($input->post->categorylist as $value) { $selector .= ((int) $value) . '|'; } $pages->find(rtrim($selector, '|'));
  4. Can you describe more about the repeater? Maybe a screenshot of what it looks like and/or what fields are in it. Does the front-end of your site iterate these repeater items?
  5. I agree, I do this sometimes too (or something like it)
  6. Thanks for the follow-up, glad that you were able to find a fix for this. That rewrite rule you came across is just one to keep everything closed off in /site-default/, since that holds pre-installation files and generally doesn't exist after the site has been installed.
  7. I'm not sure that I understand the question 100%, but am thinking you might be thinking of "hidden" as a type of field (like it would be in HTML), as opposed to a status that any field can have. In ProcessWire, setting the visibility to hidden can be done with any field and it's not related to the field type. That field will still be present in all of your API usage… it just won't be rendered in the page editor. So it's great for fields that you want to store things in from the API side, while excluding it from the interactive side.
  8. This module installs a page on your Setup menu in the admin where you can manage comments (assuming you have a comments field installed). Download from the modules directory at: http://modules.processwire.com/modules/process-latest-comments/ Features include: Easily find the latest comments needing approval or moderation. Shows comments from all pages on 1 screen, paginated and in chronological order. Enables you to change the status of any comment, edit the text or delete. Filtering by status/type, cite, email or IP address Screenshot: I've been wanting to build this for a long time, and something like this should have been there from the beginning, as it's a bit tedious to keep track of all your comments on a large site without this. So this module may be moved into the core for version 2.3, in which case it'll be renamed to ProcessComments, so as not to conflict with those that may have this installed.
  9. Soma is correct that you can set the "visibility" to "hidden" in the field settings, and then the field can exist on the page but won't appear in the page editor.
  10. Which module did you try to install? Do the errors persist even after restoring the default admin theme? What admin theme did the errors occur in? I'm not sure I've got enough understanding of the problem to know what solution to offer, so the more you can post about it the better (screenshots of the error messages might even help). But since you mentioned an issue that started as the result of installing a module, you've got me curious about what module could do this. One thing you might try is to go to the Admin > Modules and click "Check for new modules" as that will reset the cached module information. If you can't access that screen, let me know and I can tell you how to do it manually too.
  11. You may also be able to setup an automatic sort by editing the repeater's template file and setting it under the 'Family' tab. Note that the repeater templates aren't visible in your templates list at first so you'll need to check the box to "show system templates" in the filter menu.
  12. It's been awhile since I looked at this, but I seem to recall some issue with DOUBLE going back into PHP that wasn't an issue with FLOAT, so put it off to research later. I need to take a closer look again. But what you did by modifying the schema directly towards your needs is a fine way to go in this case. ProcessWire is not going to go and change your schema back or anything (unless you change the fieldtype), so it should be safe. But please let me know if you run into any issues with losing precision on the DOUBLE when going to/from PHP.
  13. Repeater fields can't be cloned yet. I couldn't find a way to make it workable in the short term, so I set it to throw an Exception if you try to clone an repeater field (preventing the clone from happening). It could be that you have one of the versions between when repeaters were added and when the repeater cloning issue was discovered, so you may want to upgrade to the latest. Though let me know if this is occurring even on the latest version. But I think that's very likely the issue, and that you need to create those fields without the clone. Please let me know what you find.
  14. I think the question might be too broad for me to know if I'm answering the right thing. But if you are able to get a URL to the thumbnail, you can always add it to a ProcessWire image field like this (assuming your field is named 'images'): $page->images->add("http://domain.com/path/to/file.jpg"); Or if it's a single image and output formatting on: $page->image = "http://domain.com/path/to/file.jpg"; The first example is more likely the one you'd want. When you save, it should download the image and put it into the system.
  15. These things aren't in the repeater at present. But the repeater fieldtype is still in it's first version, so will be expanding upon it and these seem like good ideas.
  16. I'm not sure about the implementation side in this module, or whether this is a good idea for the module or not. But on the ProcessWire PageList side, the client would have to lack view access to the pages in order for them not to see them in the tree. That could also be handled on the fly by the module with a hook to Page::viewable. There may be other ways too I'm not yet thinking of.
  17. SmartyPants is separate from Markdown, though the two often go together. I think they are both originally from the same author actually. SmartyPants just adds auto replacement of regular "quotes" to curly “quotes”, replacement of straight apostrophes to curly apostrophes, replacement of 3 dashes to em dashes, replacement of two dashes to en dashes, and replacement of 3 periods to ellipsis. As far as I know, the language support is limited to those that would use those characters. Since what SmartyPants does is all pretty simple, it wouldn't be too hard to make a textformatter plugin for another language that does something similar. I think the quotes and apostrophes are the only ones that require some context logic to make sure they are going where they should and not where they shouldn't.
  18. Thanks for posting this, these seem like some useful additions and some good insights on sitemap.xml too.
  19. This thread started as a result of our 1500th post, and we are now well over our 15,000th, in a relatively short period of time. Now thinking of the huge celebration we should have when we reach our 150,000th post. Thanks to everyone here for making this such a great community! --- Edit: I removed the 500th member thing, as Pete correctly pointed out to me that the system still has some banned users in it, so we don't have a way of telling exactly who the 500th real member is. Sorry Ralph99.
  20. I've put together a Process module skeleton that may be good as a starting point for any Process module. It is well commented and fully functional as a demonstration. It also includes instructions on what to do with it when using it as a starting point for another module: http://modules.proce.../process-hello/ I'm planning to make more skeleton modules to cover all the bases.
  21. That comment is still the old version before the page was saved. You might need to re-retrieve it from the page in order to get the version with the populated ID. But this may be something you could just drop into your existing code without having to change much else: $email = $this->db->escape_string($comment->email); $status = Comment::statusPending; $result = $this->db->query("SELECT id FROM field_comments WHERE status=$status AND email='$email' ORDER BY created DESC LIMIT 1"); $comment_id = 0; if($result->num_rows) list($comment_id) = $result->fetch_row();
  22. Thanks for posting- Looks good. We don't have anything like this yet, so I'm sure this'll come in handy!
  23. It's quite a mystery. Can't say as though I've seen something like this before. It has me wondering if there is some mod_security setup or something else that is interfering with the usual behavior... that's the only thing I can guess, but I'll keep thinking.
  24. Marc is this server running Apache or some Apache clone? The reason I ask is that it's not behaving like Apache. ProcessWire should never get control of the request due to these two directives: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d That basically says: "In order to give control to PW, the requested file or directory must not exist." So assuming it's actually Apache and it understands those directives, we have to look at why it's not associating that with what's actually on the file system. I would probably try adjusting the RewriteBase line to be "RewriteBase /". If that doesn't work, you might want to look at enabling the VirtualDocumentRoot line (at the bottom of the htaccess file). The 'nobody' permission should be okay. That's most likely the user that Apache is running as. You've got me curious please let me know what you find.
  25. You could also try turning of session fingerprinting from your /site/config.php. Fingerprinting keeps track of your IP and HTTP user agent, and destroys the session if either changes. That sounds like what's happening to you. /** * sessionFingerprint: should login sessions be tied to IP and user agent? * * More secure, but will conflict with dynamic IPs. * */ $config->sessionFingerprint = true; // change to false
×
×
  • Create New...