Jump to content

ak1001

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by ak1001

  1. Is it possible to restrict access to /admin page to only specific ip addresses? like in apache conf for example : <Location /> Require ip 192.168.0.0/24 </Location> ?
  2. Hi, I have a page template for products with multilang fields . And many such pages on site (around 20000) And i need to to display all products without translations on any used languages on any of those multilang fields (body, name, color, etc..) Is there selector of some sort to find those pages? Or iterate and manually check fields values for empty on every language is the only way?
  3. I preffer Mysql . One my site uses version 8.0.19 , another - 8.0.17. No problems.
  4. Hi @horst ProcessWire 3.0.98Pageimage Manipulator 2 0.2.9 exact urls something like : site/assets/files/9771/30x30.jpg pim image : site/assets/files/9771/30x30.-pim2-wm3.jpg Also i was lazy to rename images so i just count loops in PageImageManipulator02.class.php // Construct & Destruct the ImageManipulator02 for a single image public function __construct($entryItem=null, $options=array(), $bypassOperations=false) { ... if(!$this->isOriginal) { // traversing up 'til reaching root reference $this->originalImage = $entryItem->original; $countloop = 0; while(null !== $this->originalImage->original) { $countloop++; $reference = $this->originalImage->original; $this->originalImage = $reference; if($countloop > 5) { error_log("---- ImageManipulator02 loop! ".__LINE__); error_log("---- loop filename= ".$this->filename .", ".__LINE__); break; } } } ...
  5. So, public function ___isVariation in class Pageimage have a regexp $re1 = '/^' .. '(\d+)x(\d+)' .> // 50x50 '([pd]\d+x\d+|[a-z]{1,2})?' . <>// nw or p30x40 or d30x40 '(?:-([-_a-z0-9]+))?' . // -suffix1 or -suffix1-suffix2, etc. '\.' . $this->ext() . <> // .jpg '$/'; that will match names like 30x30.jpg and always says this is a variation image. And this will cause the pim go in endless loop. Don't know is there some consequnces for processwire, seems only pim react abnormally. I will rename all images for now, and will ask users to not use such type names, but some prevention methods must be used i think
  6. Investigating further, in my case problem i think with some file names. For example one page with three images break down on image named 30x30.jpg. I think processwire thinks that it is a variation image forewer. mysql> select pages_id, data, sort from field_tovarimages where pages_id = 9771; +----------+--------------+------+ | pages_id | data | sort | +----------+--------------+------+ | 9771 | 30_belyi.jpg | 0 | | 9771 | 19480.jpg | 1 | | 9771 | 30x30.jpg | 2 | +----------+--------------+------+ 3 rows in set (0.00 sec) So in pim $this->originalImage == $this->originalImage->original and it makes loop ?
  7. ProcessWire 3.0.98 Pageimage Manipulator 2 0.2.9 Some files(?) put pim2 in endless loop . Loop in ImageManipulator02.class.php : public function __construct($entryItem=null, $options=array(), $bypassOperations=false) { // version check module == class $m = wire('modules')->get('PageImageManipulator02')->getModuleInfo(); $m = preg_replace('/(\d)(?=\d)/', '$1.', str_pad("{$m['version']}", 3, "0", STR_PAD_LEFT)); $c = preg_replace('/(\d)(?=\d)/', '$1.', str_pad("{$this->version}", 3, "0", STR_PAD_LEFT)); if(!version_compare($m, $c, '=')) { throw new WireException("The versions of Module PageImageManipulator02 ($m) and it dependency classfile ImageManipulator02 ($c) are inconsist ent!)"); return; } $this->bypassOperations = true===$bypassOperations ? true : false; // validate PageImage, FileImage, MemoryImage if($entryItem instanceof Pageimage) { $this->pageimage = $entryItem; $this->entryItem = 'page'; $this->filename = $entryItem->filename; $this->isOriginal = $entryItem->original===NULL ? true : false; if(!$this->isOriginal) { // traversing up 'til reaching root reference $this->originalImage = $entryItem->original; while(null !== $this->originalImage->original) { // !!!!!!!!!!!! ENDLESS LOOP HERE !!!!!!!!!!!!!!!!!!!!!!! $reference = $this->originalImage->original; $this->originalImage = $reference; } } }
  8. Recently tried Go and was good surprised with simplicity and speed Theoretically is it possible try to serve ajax requests ( crud db, data json output ) through GO from processwire driven site?
  9. thanks, dragan i should have set pdo_mysql.default_socket in php.ini
  10. I think yes. It is localhost : 3306 and I have logged from cli couple of times with used username/password and see granted database. have tried InnoDB and MyISAM options - no diference. I have nonstandart mysql.sock location, but it set in my.cnf. can it be problem?
  11. Hello Is there some mysql 8 specific topics? tried to install Processwire on clean lamp server with mysql 8, got two errors in installer: Database connection information did not work. SQLSTATE[HY000] [2002] No such file or directory and can't go further
  12. Thanks a lot, i found my mistake. I had tried to install Template Twig Replace module it have a $config->templateExtension = 'twig'; in site/config.php after i deleted this string your example works! And thanks for suggesting to keep twig and php in one folder.
  13. Thanks @Wanze I tried to do next 1 site/templates/home.php ( with myvar variable) 2 site/templates/views/home.html (twig template) and get error Notice: Undefined index: TemplateEngineNull in /home/WWW/pw/processwire/wire/core/Modules.php on line 3023 then i added empty home.twig : 1 site/templates/home.php (with myvar variable) 2 site/templates/views/home.html (twig template) 3 site/templates/home.twig (empty) and it works but not output myvar value! Only page.title and page.body So working combination in my case only php code in home.twig and template in home.html. home.php is not working/needed So i'm little confused what i do wrong.
  14. Big thanks for the module! I think it is very useful for processwire. I think it will be very practical for newcomers ( like me ) to include some basic examples to start with. Suppose i have a blank profile installed and created only home page with home template consist of title and body After installing TemplateEngineFactory module first, and TemplateEngineTwig second, and then setting engine to twig, one need to 1 delete file site/templates/home.php 2 create file site/templates/home.twig 3 create file site/templates/views/home.html please correct me if i wrong //home.html <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>{{ page.title }}</title> </head> <body> <h1>{{ page.title }}</h1> {{page.body}} <hr> <p>myvar:{{myvar}}</p> </body> </html> //home.twig <?php $view->set("myvar", "my test var");
  15. I am very like processwire and look it closely for over 3 years i think, surely it well suited for tasks like simple site or blog. But i need more e-shop options : products , categories, clients. So SKU must be unique, user login/emails must be unique, orders must be unique with custom prefix-suffix autoincrement and so on. And you must have ability to manage all this in a grid like view from admin width search/filter capability. So after 3 years of development since i look on pw i don't see it matured in this direction. This don't make pw bad, it's still cool cms
  16. I think i can add to CONTRA PW inability to design some simple database features like unique fields and datagrid like data editing in admin from the box So after many years of development PW still not mass used , big projects are still complicated. I observe how opencart now widespread and even how people trying magento 2 -very complicated system - but no one want to program on PW.
  17. Hi, Good to have a forum , i tried to install Processblog for PW3.0 from modules page , it no work. Than i found BitPoet version for PW3 here, thanks a lot. I met some troubles with home page and messing with permissions for blog authors. Is there a way to implement "most popular posts" functionality?
×
×
  • Create New...