-
Posts
601 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Frank Vèssia
-
nothing changed
-
I'll try that, thanks
-
Hello, I always enabled the session handler DB on my sites and it worked pretty well, but right now I'm facing a big issue because it's slowing down the server. I have a dedicated server with 32 core and 192MB RAM so it's a good beast but since the traffic on the site is huge the session table is up to millions records each day. I also setup the config like so ini_set('session.gc_probability', 1); ini_set("session.gc_divisor", 100); still the amount of records is impressive and the queries deleting the sessions are constantly executing and they are slow...any idea how to optimize this? thanks
-
Hello guys, I'm trying to setup a textarea allowing extra content for the tag <A> but it's not working, i just need to be able to add "class" to the tag, so I just added this to the ckeditor input settings, "extra allowed content" a[href,class,rel] but it's ignored...any idea? using PW 3.0.42
-
Hello, I just copied a website on a new domain on the same VPS as I made hundreds of times, but this time I get this error regarding PDO support Fatal error: Exception: Required PDO class (database) not found - please add PDO support to your PHP. (in /home/public_html/wire/core/ProcessWire.php line 260) #0 /home/public_html/wire/core/ProcessWire.php(118): ProcessWire\ProcessWire->load(Object(ProcessWire\Config)) #1 /home/public_html/index.php(52): ProcessWire\ProcessWire->__construct(Object(ProcessWire\Config)) #2 {main} in /home/public_html/index.php on line 64
-
Hi, is there a way to throw a 404 if the page number doesn't exist? I have 77 pages but if i type the 78 I can still see the page (empty of course) and i think google is messing up in some way indexing those pages, even if there are no links to them.
-
Hello, some images on my website get error (too many redirects) but just for the variation version on ssl. so the image /site/assets/files/0/02/07/557/xxx.jpg is ok but /site/assets/files/0/02/07/557/xxx.380x180n.jpg is not displayed I've recently moved my domain on ssl so right now every url redirects to https and almost all images are ok, but some of them get this error.....any idea?
-
yes, sort=parent was the missing point. thanks
-
This doesn't group by parent, simply add the parent on top of each dish. I need to render all dishes of a restaurant one time I need to search by dishes but render exactly like I have in the tree.
-
Hi, it's possible to get the result of a selector grouped by parents? My structure is like this restaurant 1 - dish - dish ... restaurant 2 - dish - dish ... In my search form there is a free text for searching a dish and a location. (location info is inside restaurant) The result of the search should be the list of restaurants offering that particular dish, with the dishes below. Right now I first search all restaurants in that location and after that all dishes (if they have) and display the result by restaurant. This is not the best because I have to search all restaurant I have first. I tried just to search for the dishes with parent in that location but in this way I can display only the dishes list and I need to display the restaurants list with the dishes below.
-
I solved. The problem was I imported all those pages as children of an admin page. That caused the block. Moving the pages fixed the problem.
-
Hi guys, I imported some emails and I created a page for each (about 100k pages). After the import I got this error whe I try to login into the admin Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 32 bytes) in /home/public_html/wire/core/PageTraversal.php on line 111 and the tree doesn't show up. Any idea?
-
Module Page Image Manipulator | API for 1 & 2
Frank Vèssia replied to horst's topic in Modules/Plugins
the image field holds multiple images, that was my first thought the echo outputs the same filename, there is no variation, that's the problem, it replaces the original image -
Module Page Image Manipulator | API for 1 & 2
Frank Vèssia replied to horst's topic in Modules/Plugins
I'm using pim2 as you can see from the code "->pim2Load". In any case (prefix or suffix) the original image has been replaced. Anything to look in PW, some config options can interferes with the module? -
Module Page Image Manipulator | API for 1 & 2
Frank Vèssia replied to horst's topic in Modules/Plugins
Hi, I don't know if depends of PW devns 3.0.10 or something in my code but this $watermark = $config->paths->root.$config->site_cdn."wm.png"; $options = array('outputFormat'=>'jpg','quality'=>70); // first method $pic->image->first()->pim2Load('wtm')->setOptions($options)->watermarkLogo($watermark,'SE',8)->pimSave(); // another try $pixelateVersion = $pic->image->first()->pim2Load('pxtd',true)->setOptions($options)->width(700)->pixelate(30)->pimSave(); $pic->image->add($pixelateVersion); simply overwrites the first image file without creating a copy with prefix as expected. I copied this code from another pw installation (2.6) -
solved, I don't know why but the template had the option "Use Compiled File" off
-
Hi guys, I'm trying to integrate the facebook sdk to register/login users but I'm getting a strange error when I try to create a new user after I get the facebook token. Fatal error: Class 'User' not found in /var/www/vhosts/httpdocs/site/templates/social_fb_callback.php on line 41 it's possible the facebook sdk interferes with pw classes? this is the complete code. I'm on PW 3.0.10 <?php require_once('../Facebook/autoload.php'); $fb = new Facebook\Facebook([ 'app_id' => 'xxxxx', 'app_secret' => 'xxxxx', 'default_graph_version' => 'v2.5', ]); $helper = $fb->getRedirectLoginHelper(); try { $accessToken = $helper->getAccessToken(); } catch(Facebook\Exceptions\FacebookResponseException $e) { // When Graph returns an error echo 'Graph returned an error: ' . $e->getMessage(); exit; } catch(Facebook\Exceptions\FacebookSDKException $e) { // When validation fails or other local issues echo 'Facebook SDK returned an error: ' . $e->getMessage(); exit; } if (isset($accessToken)) { // Logged in! $session->facebook_access_token = (string) $accessToken; // OAuth 2.0 client handler $oAuth2Client = $fb->getOAuth2Client(); // Exchanges a short-lived access token for a long-lived one $longLivedAccessToken = $oAuth2Client->getLongLivedAccessToken($session->facebook_access_token); $token_fb = $sanitizer->selectorValue($session->facebook_access_token); $checkUser = $users->get("token_fb=$token_fb"); if($checkUser instanceof NullPage){ // new user try { $fb->setDefaultAccessToken($session->facebook_access_token); $res = $fb->get('/me?fields=first_name,last_name,email'); $userNode = $res->getGraphObject(); // get profile picture $res = $fb->get( '/me/picture?type=large&redirect=false'); $picture = $res->getGraphObject(); // get email if($userNode->getProperty( 'email' ) == ''){ $uemail = "tocomplete"; }else{ $uemail = ""; } $nome = $userNode->getProperty( 'first_name' ); $cognome = $userNode->getProperty( 'last_name' ); $pass = "vogliadi".rand(100,10000); // creo username dal nome e cognome e se esiste aggiungo un numero alla fine. $username = strtolower($nome).strtolower($cognome); $checkuser = $users->get("name=$username,token_fb!=$session->facebook_access_token"); if($checkuser->id){ $username = $username.rand(10,100); } //registro utente $u = new User(); $u->name = $username; $u->pass = $pass; $u->passclear = $pass; $u->email = $uemail; $u->nome = $nome; $u->cognome = $cognome; $u->token_fb = $session->facebook_access_token; $u->privacy_newsletter = 1; $u->addRole("guest"); $u->addRole("member"); if($u->save()){ $u->profilepic = $picture['url']; $u->save(); $session->login($u->name,$u->pass); } $session->redirect("/",false); } catch(Facebook\Exceptions\FacebookResponseException $e) { // When Graph returns an error echo 'Graph returned an error: ' . $e->getMessage(); exit; } catch(Facebook\Exceptions\FacebookSDKException $e) { // When validation fails or other local issues echo 'Facebook SDK returned an error: ' . $e->getMessage(); exit; } }else{ // login $session->login($checkUser->name,$checkUser->password); $session->redirect("/",false); } }
-
Maybe I found a solution can be useful to others. When a user register I have a field with an auth code so the user must check his email and click on a link to verify the account. I can recycle this field and after the verification process I can simply set as "firstlogintogo" or whatever I can check after login and clear after the first login.
-
There is an internal field or a way to detect the first user login after I created it via API? I usually create a dedicated field/checkbox for this but I'm wondering if I can use some internal way avoid to add a field to the user template.
-
mmm thanks I didn't see that
-
Hello gyus, I recently update one website from pw 2.7 to 3.0.10 and I'm getting a strange error, the code is this one $check_vid = $config->paths->root."video/111.mp4"; if ( file_exists($check_vid)){ do things } I get this error Fatal error: Exception: Download URLs must begin with http:// or https:// (in /home/disinibi/public_html/tube/wire/core/WireHttp.php line 576) any Idea why it's trying to download the file?
-
PW 3.0.8: Smarter+faster page tree and a ProDrafts update
Frank Vèssia replied to ryan's topic in News & Announcements
yep I know it's messy but I need those pages directly under the home...my SEO requested so... and I don't want to create some htaccess tricks to remove the container page between home and those pages -
PW 3.0.8: Smarter+faster page tree and a ProDrafts update
Frank Vèssia replied to ryan's topic in News & Announcements
I'm having some issue with the new page tree. I have 163 home's children (+8k pages). In the first page it works fine if I open a page, go anywhere and come back, but is not working for paginated pages. Screen capture video http://sendvid.com/vyi8nkb2 -
I noticed a "bug" maybe.. I removed "#_ProcessPageEditChildren" for the "selector to hide" option because I want to add childrens but inside the popup when I click to "add new page" button I can see the new page form for just one sec and then the popup closes
-
This module is amazing...I'm gonna test very soon for sending emails after user actions.