Jump to content

evanmcd

Members
  • Posts

    117
  • Joined

  • Last visited

Posts posted by evanmcd

  1. Hi all,

    I've just setup one of our partners on a project with logins into the backend of our latest PW based site.

    Upon logging in, they immediately started saying the the admin interface was responding very slowly - as in 30 or more seconds to load a Page with eight children.  They just get the loading triangle animation after logging in for a good minute or two sometimes.  Other times it loads right away.

    They have assured me that they have a solid network connection and that other sites are loading as expected.  They've tried from office and home locations with the same results.

    In addition, if they click the edit link on any page, they are taken to the login screen.  This happens every time.

    Of course, I'm baffled as I'm not experiencing any issues.  Has anyone had an issue like this before?  What troubleshooting steps would you recommend?

    Thanks for any help you can offer.

  2. Hi everyone,

    I'm trying to get image resizing to work in what I thought was a pretty standard way: the final image needs to maintain it's aspect ratio, not be cropped and be as tall or as wide as it can be up to a certain height and width.

    For me the max width and height is 410.  So, I have the following code:

       $photo = $entry->photo;
       $options = array('upscaling'=>true,'cropping'=>false,'quality'=>80);
       if($photo->width > $photo->height) {
        $photo = $photo->size(410,0,$options);
       } else {
        $photo = $photo->size(0,410,$options);
       }
       $entry->photo = $photo;
       $entry->save();

    Unfortunately, if I upload an image that's 1023x1852, for example, it doesn't get resized at all.  What could I be doing wrong?

    Thanks for any help you all can offer.

  3. Hi Ryan,

    Unfortunately, the feed that was causing problems is now back up and running normally.  I thought that I could recreate the issue by creating a php page on another server with a timeout set to at least 5 min, sleeping the script, and using that as the RSS feed, but that didn't work.

    I'll be sure to let you know if I ever come across is again.

    Thanks.

    • Like 1
  4. Hi Ryan, just saw this now.  We're working with someone now who found out about the job from this post.  We're excited to be working with someone who's got solid PW skills.

    Thanks for the offer anyway.  Should we ever come across any PW work that mere mortals can't solve, we'll be sure to reach out :)

    • Like 4
  5. Oh, of course, the children are all unpublished.  "Why couldn't you easily tell that they were unpublished by the strikethrough" you ask?  Because I'm using a slightly modified version of @Soma's nice PageListImageLabel module that has images shown as dimmed when they are published but fully opaque when they are unpublished (for moderation of the images).

    Thanks @Wanze and everyone for the help.

    Oh, and of course special thanks to @Adamkiss for the "hug".  Those guys are only slightly balder than I am :)

    • Like 2
  6. Hi,

    I'm having the strangest problem, that I'm guessing someone will look at and figure out in two seconds.  It's been that kind of day...

    I'm simply trying to loop through the children of a page using the code below:

    $my_page = $pages->get("/my-page/");
    echo('<p>$my_page->numChildren: ' . $my_page->numChildren . '</p>');  // 84
    $my_children = $my_page->children;
    echo('<p>count($my_children): ' . count($my_children) . '</p>'); // 0
    foreach($my_children as $child) {
        echo('<p>Looping on $child</p>'); // never displayed
    }

    What I'm getting is not making sense... why would numChildren return the correct number of children of the page, but $page->children wouldn't?

    Thanks.

    • Like 1
  7. Hi Ryan,

    Thanks for this module.  Have been using it on our main site for awhile now.  Just wanted to let you know of an issue that I just discovered that others may run into, and see if there's a way to handle it.

    I was trying to load a feed that for awhile was not responding.  The feed page wasn't throwing an error or even timing out, just loading for minutes on end.

    This ended up causing a timeout on our site (the feed was loading on the main page) and producing this error in the PW log file:

    Error Exception: MySQL server has gone away (in /mnt/stor7-wc2-dfw1/526843/www.agencypja.com/web/content/wire/core/Database.php line 118)

    For now, we've just disabled that feed, but we are using the module to load other feeds.  Do you (or anyone else) know of a way to address this issue?  I don't see a timeout option in the module, but could certainly look into adding one if that determined to be the best option.

    Thanks.

  8. Thanks guys, for the help.  I thought it was MySQL as well, but it's turning out to be an issue with RSS: a feed that we're loading through the PW RSS module is not loading - not timing out - just never loading.

    Looking into the fix now, but at least I've just been able to disable that feed and get the site back up.

  9. Hi all,

    Hoping someone has experienced this before.  Honestly, I'm not sure the issue is PW specific - I'm able to login to the admin - but when I navigate to any front-end page, I get a timeout and the 'MySQL server has gone away' error message in the log.

    Any help would be GREATLY appreciated.

    Thanks.

  10. Hi all,

    Happy to be the first post here in the Jobs forum. I'm the Director of Technology at PJA Advertising + Marketing and am looking for a skilled PW dev to work on a migration of one of our client's site's, which is currently on Joomla 1.5, into ProcessWire.

    We've been using ProcessWire for more than a year now and absolutely love it. Here are a couple of examples of site we've built using it:

    Our team has begun the work, but want to complete the job by the end of January and so are hoping to find someone to do some basic (moving pages into an existing template) to intermediate (creating new fields and templates) level work. If we were able to find someone with more advanced skills (creating the customized search system, for example), that would be a bonus.

    There will be basic HTML, CSS and possibly Javascript work as well. Familiarity with git is a bonus.

    Depending on the hourly rate, we could potentially offer 40 hours a week of work until the end of January.

    Ideally we'd be working with someone in the US, but it's not a requirement. The most important factors are: 1) skill with ProcessWire, 2) ability to work well with me and my team, 3) speed and 4) hourly rate.

    The site we're moving is http://www.westlakehardware.com

    We've got the home page and a couple secondary pages setup, as well as some IA work around how categorization will work. Other than that... well, there's plenty to do :)

    Looking forward to hearing from anyone who's interested.

    Cheers,

    Evan McDaniel

    emcdaniel@agencypja.com

    • Like 1
  11. Hi,

    In trying to find a good host for a PW based site, I'm trying out a host (Westhost) that has the suhosin security extension.

    After figuring out that suhosin doesn't allow php scripts to run with their group write bit is on, I got to the end of the installer. Once the install completed, I got the basic "Unable to complete this request due to an error. " when trying to access any PW powered page.

    Has anyone come up against this in the past and found a solution?

    Thanks.

  12. Hi,

    I have a case in which I've got a directory of php files that I don't really want to be managed by PW - they are just HTML snippet views being called by the only page in a single page web app.

    The bottom line is that creating Templates and Pages for all of them seems like an unnecessary step, given that these files won't contain content that's managed by PW.

    Is there a way to tell PW to just ignore the files in a particular directory, allowing them to be served as they would without PW?

    An odd request, I know, but I think it makes the most sense for this particular use case.

    Thanks for any help.

  13. Hi all,

    Strange problem I'm running up against here - just trying to use $sanitizer->name() on a string I want to end up as an HTML class value.

    In my PW template, if I call it in the main scope of the page, it's fine.

    If I call it inside a function, I get a call to a non-object error.

    OK, so just for kicks I passed $sanitizer into the function, but still get the same error.

    Then, I figure OK I'll create a module that manages the markup I'm creating (seems like a good thing to do anyway). But, much to my dismay, I get the same error when calling from within the module.

    How do I properly call it in any other scope other than the global scope of a template?

    Or am I missing something much more simple?

    Thanks.

  14. I think I'm gonna go with creating a PW page that has the content I need and pull it into the Joomla page via ajax. Not the greatest solution, but I'm up against a huge time crunch so have to get something going now.

    Open to any other suggestions though :)

  15. Hi all,

    I'm building a new section on to an existing Joomla (1.5) site. I think the PW admin interface will be great for this purpose and so I've setup PW in a subdirectory of the main site.

    All installs well, but I'm running into issues when I try to include the PW bootstrap file in a Joomla template.

    I simply add:

    include("admin/specials/index.php");
    

    where 'specials' is my PW root.

    What I end up with is this error"

    "Class 'JDocumentRenderer' not foundClass 'JDocumentRenderer' not found in /libraries/joomla/document/html/renderer/modules.php"

    Is there another way for me to include PW that might remove any conflict with Joomla? I am running 5.3 if that matters.

    Thanks!

  16. Hi,

    I've got a PW site functioning as a contest administration interface in which each contest entry is a Page. I've just passed 10k entries, and am starting to see performance issues in a custom reporting page I built.

    Here's how I get the first part of the data I need for the reporting page:

    $totalUnpublished = $pages->find("template=entry,status=unpublished")->count();
    $totalPublished = $pages->find("template=entry, parent!=/entries/rejected/")->count();
    $totalRejected = $pages->find("template=entry,parent=/entries/rejected/,include=all")->count();

    I can imagine these calls are using a lot of memory, so I checked into the memory_limit setting and it's set at the 5.3 default of 128M. I would have thought that would be enough, but... no.

    Is there a way for me to lighten the load of the returned PageArrays to reduce memory usage?

    Thanks.

  17. Couple things I'm looking to do to improve this module are to:

    1. add the ability to pass in the native fields you'd like in the output
    2. add an option in the Field Details section for whether or not you want the field included in JSON output

    Re the first one, I could use a bit of help trying to figure out how to pass options into a hooked function. I've tried adding an $options param to addHook, like this:

    $this->addHook('PageArray::toJSON', $this, 'pagesToJSON', $options);

    and calling it like this:

    $myPages->toJSON(array('fields' => 'id,name'));

    But, when I do I get this error:

    Method PageArray::toJSON does not exist or is not callable in this context (in /Projects/TeamScheme/teamscheme_0.5/wire/core/Wire.php line 231)

    If someone could point me in the right directions for adding params to hooked functions (and perhaps point to a module that implements something like I want to do wfor item #2) I would appreciate it.

    Thanks.

  18. Yes, Ryan you nailed it. I fixed that up (and also another small fix to how I called the pageToArray function) and it's good to go.

    Do you still prefer that we offer new modules up via a forum post, or is there another way?

    Thanks for your as always excellent help :)

×
×
  • Create New...