Jump to content

Frank Vèssia

Members
  • Posts

    584
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Frank Vèssia

  1. Hi, there is no CDN enabled or caching. The only thing I disabled while checking the problem was the mod_pagespeed which was enaled by default on bitnami server, but nothing changed. I'm running the latest 2.6.1
  2. Hello guys, I'm facing a very strange issue. Out of nowhere my website is not responding fast as always and I didn't change anything. The issue is probably pw related because I checked everything else. - the server is running (on bitnami) - other static pages inside the root folder (not managed by pw) are accessible and rendering fast - I don't get eny errors inside logs files - Database is ok - I didn't make any modification to the PW or templates in the last month right now my pages are loading in about 1 minute (just the pages managed by PW) any idea of what to check? thanks
  3. Thanks and sorry for the late reply I just read it.
  4. Hi guys, I'm updating this discussion. After a while using @wanze solution to avoid the 32k limit of subfolders I'm thinking of upgrade PW to the latest version (from current 2.3) because since middle 2014 I didn't make any update because of this core custom modification. Now PW also solves this issue with the config option $config->pagefileExtendedPaths. Is there any chance the pw solution is the same of wanze so updating pw don't cause any issue to my current folders structure?
  5. Can be something related to the render function which I'm using for display the comments and the form? In fact I've noticed differences between the default function <?php echo $page->comments->renderAll(); ?> and the "manual" functions with custom parameters that I'm using <?php echo $page->comments->renderForm(array( 'headline' => "<h3><i class='cki-meatknife'></i> Commenta questa ricetta</h3>", 'successMessage' => "<div class='alert alert-success'>Grazie per aver commentato la ricetta.</div>", 'errorMessage' => "<div class='alert alert-danger'>Ci sono stati degli errori, riprova a scrivere il commento</div>", 'processInput' => true, 'encoding' => 'UTF-8', 'attrs' => array( 'id' => 'CommentForm', 'action' => './', 'method' => 'post', 'class' => '', 'rows' => 4, 'cols' => 50, ), 'labels' => array( 'cite' => 'Nome', 'email' => 'Email', 'text' => 'Commento', 'submit' => 'Pubblica', ), )); echo $page->comments->render(array( 'headline' => '<h3>Tutti i commenti</h3>', 'commentHeader' => '{cite} <small>ha scritto il {created}</small>', 'dateFormat' => '%d %B %Y alle %H:%I', 'encoding' => 'UTF-8', 'useVotes' => 1, 'admin' => false, // shows unapproved comments if true ));?> The second method doesn't display votes for example, and ignore the datetime format set for the field, so "maybe" also skip the notifications? It's like these methods are not using the new comments system...just guessing..
  6. mmm...yes I can see the module is using wireMail()...so the problem is somewhere else...thanks guys for the tips.
  7. I'm running a blog on a Bitnami server which doesn't have email support. I'm using wireMailSmtp module with Amazon s3 for all the emails sent via Api but what about built in comments? Email notifications to admin and users don't work...any idea how to allow comments using smtp service?
  8. Hi guys, suddenly I'm logging out continuously as admin, after few minutes of sometimes seconds. Is there something I have to check? I tried to clean averything, cache, sessions (I'm using DB sessions), etc... I'm using 2.6.1 master
  9. I had a website with a lot of subdomains, now I want to redirect all subdomains to internal pages, is there a way to do this with jumplinks? I would like also to suggest a couple of small "improvements" as result of my experience with this fantastic module. 1. possibility to filter 404 errors per type, like images, pages, css, etc.. I have a lot of 404 errors and having such option could be very helpful. 2. check for already created jumplink. When moving a lot of pages sometimes I created duplicated links without noticing...
  10. with the horst's help I found out the problem is related to the watermark jpg file, when pim tries to access to the jpg, this cause the javascript to generate the error, I'm still investigating more but at this point pim is not the direct cause, just to be clear
  11. horst, yes it's how you described, strangely... I tried with android latest version and it doesn't work, from ipad2 it works... I PMd you
  12. I figured out the problem, it's the pim module...If I comment the part where add the watermark it works also on mobile, the question is why??
  13. Hi guys, I'm working on a code for uploading images via jQuery with fineuploader script. The code is working good on desktop, but on mobile I got an "unknown" error from jquery but i think the problem is inside the php. Basically I upload the images in a temp dir, after that I create a page for each image which contains an image field and attach the image. I also use PIM module for adding a watermark. PHP <?php header("content-type: text/plain"); $method = $_SERVER["REQUEST_METHOD"]; if ($method == "POST" && $input->urlSegmentStr=='') { $arr = ""; $uploadpath = $config->paths->root.$config->tmp_upload; $u = new WireUpload('qqfile'); $u->setMaxFiles(5); $u->setOverwrite(false); $u->setMaxFileSize(2048*2048); $u->setDestinationPath($uploadpath); $u->setValidExtensions(array('jpg', 'jpeg')); $minWidth = 300; $minHeight = 300; $maxWidth = 4500; $maxHeight = 4500; // execute upload and check for errors $files = $u->execute(); $error = ""; $userpage = $pages->get("template=member,userlink=$user"); $wmi = $config->paths->root.$config->site_cdn."wm.png"; $options = array('outputFormat'=>'jpg','quality'=>70); $pim = $modules->get('PageImageManipulator'); foreach($files as $file){ $tempImg = $uploadpath . $file; $newFile = $uploadpath . $_POST['qquuid'].'.jpg'; @rename($tempImg, $newFile); // I rename the file because ios uploads file using the same name "image.jpg" if (file_exists($newFile)){ list($width, $height) = getimagesize($newFile); if(!$newFile){ $error .= "Immagine non valida"; } if ($width < $minWidth){ $error .= "Immagine troppo piccola"; } if ($height < $minHeight){ $error .= "Immagine troppo piccola"; } if ($width > $maxWidth){ $error .= "Immagine troppo grande"; } if ($height > $maxHeight){ $error .= "Immagine troppo grande"; } if(!$u->getErrors() && $error==''){ $p = new Page(); $p->template = $templates->get("pic"); $p->parent = $userpage; $p->name = time(); $p->status = Page::statusUnpublished; $p->save(); $p->image = $pim->imLoad($newFile, $options)->watermarkLogo($wmi, 'southeast', 4)->pimSave(); if($p->save()){ $arr = array('success' => true); } }else{ $arr = array('error' => implode(",",$u->getErrors())); } unlink($newFile); }else{ unlink($tempImg); } } echo json_encode($arr, JSON_FORCE_OBJECT); } ?> jQuery var photoUpload = $("#photouploader"); if (photoUpload.length > 0){ var maxLimit = $(photoUpload).data('maxuploads'); var runningp = 0; $("#photouploader").fineUploader({ debug: true, maxConnections: 20, request: { endpoint: $(photoUpload).data('endpoint') }, retry: { enableAuto: true, maxAutoAttempts: 1 }, validation: { allowedExtensions: ["jpg", "jpeg"], acceptFiles: ["image/jpeg"], sizeLimit: 4194304, itemLimit: maxLimit, stopOnFirstInvalidFile:true, image: { maxHeight: 4500, maxWidth: 4500, minHeight: 300, minWidth: 300 } }, messages:{ sizeError: '{file} è troppo grande. Massimo {sizeLimit}', tooManyItemsError: 'Hai cercato di caricare ({netItems}) immagini. Puoi caricarne massimo {itemLimit}', typeError: 'Estensione non valida, solo {extensions}', noFilesError: 'Nessun file selezionatov', maxWidthImageError: 'Il file è tropo grande in larghezza', maxHeightImageError: 'Il file è troppo grande in altezza' }, text: { defaultResponseError: 'Errore sconosciuto' } }).on('submit', function () { runningp++; }).on('complete', function (event, id, fileName, responseJSON) { runningp--; if(runningp==0 && responseJSON.success){ $(location).attr('href',$("#photouploader").data('dest')); } }).on('error', function (event, id, name, errorReason) { alert(qq.format("Errore nel file '{}' Motivo: {}", name, errorReason)); $('#photouploader').fineUploader('reset'); }); } I think the error is in the php because I can see the file is being uploaded in the temp dir, after that I got the error from js, so could be something after the moving file...but I don't know for sure, and the js gives me only "unknown error" impossible to debug on mobile
  14. maybe you already solved but the default bitnami installation has different admin url, /admin
  15. I created my own "comment" module at the end...
  16. Hi guys, after a long pause on this project, I relaunched few days ago the new version of lymeta.com a website offering free high resolution photos, royalty free under creative commons zero license. Anyone can submit a photo and participate. I made a very simple design, flat and responsive, hope you like it. Cheers.
  17. If I want to add more statuses like 2,3,4 etc..., do you suggest an hook (if possible) or creating a duplicate of comments module and add statuses directly to the module?
  18. Yes, if I set to "comments must be approved..." the status is set to 0 (pending). It's like you said, the moderation settings are overriding the api settings.
  19. Tried, no differences, comment published with status 1.
  20. I'm trying to set a comment status when posting new comment via API but pw set to 1 even I set to -2 or 0. Am I missing something? I tried to play with some options in admin, like activating akismet, or quite save... with no luck. I'm using PW dev 2.5.19 $text = $sanitizer->text($input->post->txt); $root = $pages->get("template=member,userlink=$user"); $c = new Comment(); $c->text = $text; $c->cite = $user->name; $c->created = time(); $c->email = $user->email; $c->user_agent = $_SERVER['HTTP_USER_AGENT']; $c->ip = $_SERVER['REMOTE_ADDR']; $c->created_users_id = $user->id; $c->sort = count($root->comments)+1; $c->status = -2; // just for testing $root->of(false); $root->comments->add($c); if($root->save()){ $root->of(true); print "success"; }
  21. well, there is a huge amount of files and stuff here let me think about a solution, thanks for now
×
×
  • Create New...