Jump to content

NorbertH

Members
  • Content Count

    198
  • Joined

  • Last visited

Everything posted by NorbertH

  1. +1 on SqLite as it would allow simple portable web applications with just an USB stick and some php binaries.
  2. As our software department is heavily overworked we need to outsource some tasks. We are looking for someone who sets up a shop whith Processwire and extends it step by step. Features needed right at the beginning: - Age verification on registration using german "Schufa" and identification via "Personalausweis" as fallback. - Registration form that is limited to certain countries. - Multiple attributes for products. - Multiple customer groups whith different prices. - Products are updated via uploaded CSV file that needs to be read into the system by cronjob. - Template is bought from Template Moster or similar source and needs to be connected to the Processwire system. - Export orders to Collmex (https://www.collmex.de/) Module for export can be done inhouse, as we have an example action for Pagelister Pro already available. - Simple blog or news page - Some static pages for imprint, privacy policy, and several other pages needed by german laws. As the specifications may change to some extend, we aim for support on an hourly basis. All Modules and reusable elements that are created may be posted in the Processwire module directory. For further questions just ask or PM me.
  3. Actually i mostly use Linux too. Just using a Xubuntu as it is lacking most the cool and modern desktop effects i not really like. Libre Office as it often is more "compatible" for opening office documents than Microsoft office itself. In addition it has far better support for CSV data files. Gimp for grafiks, Imagemagick for scripted image processing./creation. In addition Scribus and Inkscape for other tasks Vim, Mousepad, Atom, Jedit, PHP-Storm as editor/development environment. Firefox / Thunderbird for web and communication. On the server side i almost never used anything else than Linux/BSD. Apache, NGINX, MariaDB, MySQL, PostgreSQL, PHP, Perl, Python, Bash .... What else do i need ? 😀
  4. Using this field in conjunction with a lister , i can select its subfields like width or height for the lister, but there is no content shown. The button field i although used seems to have this functionality , its subfields appear in the lister. But to be true i cant figure out whats wrong.
  5. Yep was talking about that. What hapens when i emty it completely ?
  6. Where did you get the original file , cannot find it in the theme folder in the PW download? Using the default file it should just look like the default UiKit theme, right ?
  7. I tried to use this tool https://getuikit.com/v2/docs/customizer.html To modify the look of my BE template. Just made some changes , downloaded the .less file and added its content to the theme.less file. This works good al long as i don't try to change some main colors. As far as i understand it you have made a copy of the default admin uikit theme , and then added a few extra variables (eg. to combine the color of the menubar and the main buttons into one var @tm-primary-color) Is it possible to just use a file whithout those modifications an completely rely on the UIKit Customizer ? Thanks in Advance!
  8. Hmmm , ok and concerning to Fields Array.php Line 16 So if we expect a fully complete $fields array all of those fields need to be initialized right at the beginning too ? The query itself shouldn't be so much time consuming? Do i see this correct having too many unused ,modules / templates does a simmilar slowdown ?
  9. Just, asking myself, why PW needs to load all fields and Templates at Startup. Schould be possible to store installed fileds/tamplates in a DB and load this at startup , of possibly use some kind of autoloader? Is there some documentation about the Bootstrap process? Possibly someone could point out where to find the relevant parts in the initialisation?
  10. As we are building some webapplications with the PW backend , having those really big spacings between all field elements in forms and everywhere is not too practical. UI Kit already has less spacings between all elements than Bootstrap for example , but i am looking fore a more condensed BE Theme. Maybe someone already made something like that?
  11. Almost 100 % sure fetching all vars from a form, and put them into the page. Creating an empty page , so i can add Profields Table (You cannot add this to a not saved page), set some other values like customer and delivery address , set the table with products and then save it again. // Create page $b = new Page(); $b->template="bestellung"; $bId= $b->save(); // Set basic stats $b->bestellung_user_select=$derCustomer; $b->bestellung_liefer_addresse_select=$pages->get((int)$input->post->liefer_select); if ($input->post->liefer_select=="3826" OR $input->post->liefer_select=="3827") $b->bestellung_status_select=$pages->get(3829); // status Barverkauf else $b->bestellung_status_select=$pages->get(1047); // status bestellt $b->bemerkung_area=$bemerkung_area; // Add articles (bestellung_artikel_table) //$b->of(false); // turn off output formatting foreach($myProducts as $prod) { if (!empty($input->post->artikel[$prod->id]) AND 0< (int)$input->post->artikel[$prod->id]){ $art= $b->bestellung_artikel_table->makeBlankItem(); $art->artikel=$prod; $art->stueck=$input->post->artikel[$prod->id]; $b->bestellung_artikel_table->add($art); $b->save('bestellung_artikel_table'); } } // save it all $b->save(); // Show order successfull $okBestellt=true; // Finally delete the post array , so the form is ready to go again $_POST=array(); // Global Post array $input->post=null; // Processwire post $aStueck=array(); $bemerkung_area=""; } // END of order Very simple indeed. But it does its job. (Orderpage is just a simple frontend page) Edit: Btw. have no changing field defined so it should not look after changes ? In the BE it kicks in without any changes. As a test workaround i simply made a CLI script that simply loads all pages that are not send , and then saves them again. the Hook then kicks in and sends the pages as he should. $result=$pages->find('template=46, deny_export=0, bestellung_stueckzahl!="", bestellung_user_select.count!=0, bestellung_liefer_addresse_select.count!=0, bestellung_id_collmex="", limit=2'); foreach ($result AS $p) { echo $p->name."\n"; $p->save(); }
  12. When saving a page with the "order" template in the backend IftRunner is nice to me and sends the order via page action into my accounting software. When saving "order" in a frontend page it does nothing. So i certainly missing something . Any ideas?
  13. Hey , just found that the Tracy Panel selector shows rendering time and memory consumtion of all the panels. Maybe you like to see how this impacts on a slow system on my bigger server this is almost irrelevant. Results for pagetree: I activated all for an overview . But you where right the Request Info was consuming most of my time , as it was active by default.
  14. FieldsetPage is a good idea have to experiment with it. As fas as i understand you can use the default saveReady hook for doing stuff with it . Any ideas if you have multiple shipping adresses? Possibly a pagetable would do the job... Whish we could put customized listers in those page tabs.
  15. Double memmory has no effect (still only about 20Mb used ). Processor says 47% , so thats quite a lot. Copying to another a more poverfull server helps alot , moved a nother application whith same problem recently. This is a very small box so the problem comes up very early i guess. But as soon as the application starts growing drastically(200+ fields) its always the same slowdown. Although bigger server can handle 200-300 fields. This field/template loading would be a good thing for optimisation. I can not imagine why its necessary to load all Fields/Templates every time. More and more people are building applications using PW and you cannot always avoid to add fields or templates. Maybe its possible to cache those field loads somehow or just load the fields needed ? But ok, so if you plan on a big applications right now its necessary to save fields and templates wherever you can ? What we have ... Reuse fields as often as possible. Eg. instead using one description field per dataset, generate 1 descriptions field and reuse it as often as possible. But what do i do f if i have a webshop where each client has a invoice address and a delivery address. So the client needs a double set for adress data? Somwhere i read that you should combine multiple fields into one, is there an easy example for doing this somewhere ? Another idea would be making an address template and page fields to link the reused address fields groups to the client , but there is no clean solution for editing those addresses in the client page and this ad at least a template and 2 fields. What else can we do , and how to save templates ?
  16. Is there only a list of fields loaded or the actual field data. Loading of all fields is a great bottleneck for building bigger applications like maybe a CRM.
  17. Why all fields or templates need to be loaded on any request ? Whats the reason , sounds unnecessary to me ?
  18. The application is BE only , no frontend . I added more or less just a land list whith many columns that i added. I never expected such an impact. Debug mode has almost no impact 30 ms. Tracy is installed , but i could need some hints how to use it to track those bottlenecks. The only hook added just composes a field from several others. No repeaters added . Concerning to ProDevTools The hook whith the biggest runtime was Tracy whith about 200 ms 🙂 Turning it of made the page significantly faster. Still page isn't really responsive but most time intensitive hook now takes 13 ms Rendering of /site/templates/admin.php still takes about 220 ms. After Installing and adding modules it was about 60-80 ms which i feel is still very much as Applications like Dadabik come whith a rendering time of about 10 ms on this server. Ok turning tracy back on for further testing. Concerning to tracy Selector Queries (11) none of them took more than 1 ms The PDO queries do not show how long they took... Is there a way to show this ? Php Memmory limit is 128M Peak of allocated memory 23.01 MB PHP is 7.1.2 PW is 3.0.120 In general it would be interesting what the factors are that slow down PW and why. Modules installed ? Number of Templates/Fields.? Number of Pages? And even on really high powered server i never had a rendering time below 50 ms, feels kind of strange to me.
  19. I got a small PW application running on a relatively small server. Recently i needed to extend the application with 20 fields and about 260 Pages. I would expect that this possibly slows down the ProListers or pagetree where these additions are relevant , but this slows down the whole page. Even pages that have nothing to do whith it like the modules page. How is this possible ? The page rendering time gone up about 200ms from about 150ms.
  20. Is there a hook to do something right after cloning a page ? I want the page to be saved right after cloning it either from the button in the tree or from a lister, because saving the page triggers several calculations that are not triggered by just cloning the page. Thanks in advance !
  21. Still no replacement possible 😞 Thinking this through it would be even greater if you could add custom sanitizer as modules. Maybe like : $sanitize->call($value, 'moduleName', $arguments);
  22. I really would like to see a sanitzer that uses a regex!! $sanitize->regex($value, $regex); Simply return empty if the value doesn't match. It would be even better if we got an extra option for replacements and or callback functions. If i have seen it right, there are even sanitizer that use HTMLpurifier so why is there no regex implemented as its one of PHP's most powerfull features ? Sanitizer since PW 2.6.14 integrates nicely whith $input and so on , so using a seperate preg_match()/preg_replace() isn't as elegant as using sanitizer.
  23. 1. There is a validation in place in the input field that throws a message when the pattern is not matching : (from inputfield_text.module) if($length > 0) { if($this->pattern) { $regex = '#' . str_replace('#', '\#', $this->pattern) . '#'; // add delimeters if(!preg_match($regex, $value)) $this->error($this->_('Does not match required pattern')); } if($minlength > 0 && $length < $minlength) { 2. The problem is that HTML5 pattern behaves different from preg_match() , it always behaves like the regex would start at the beginning of the line and stop with the end . if you use the pattern "^[a-z]$" in your pattern field you get correct results. HTML5 ignores "^" and "$" but always behaves like that and preg_match() is happy with those line start and line end signs. 3. So possibly it would be a good Idea adding them hardcoded: $regex = '#^' . str_replace('#', '\#', $this->pattern) . '$#'; // add delimeters
×
×
  • Create New...