NorbertH

Members
  • Content Count

    128
  • Joined

  • Last visited

Community Reputation

47 Excellent

About NorbertH

  • Rank
    Sr. Member

Profile Information

  • Gender
    Male
  • Location
    Germany

Recent Profile Visitors

2,606 profile views
  1. NorbertH

    Maybe we should use empty() instead of isset?
  2. Having the same issue whith FieldtypeSecureFile . It simply does not Trigger isChanged after i override an image (only 1 document allowede in that field)
  3. NorbertH

    $page->template->fieldgroup->getField('title', true)->label finally does it . Thanks Soma! But to be true i really expected that : $page->title->label should return the label that is set in the context of the page template not the basic lable set in the field . Wouldnt' it be more intuitive to return the the overridden label than the original one from the field? If i "override" a label in a template i expect it to be the one to be sent to my page as the label for the title.
  4. NorbertH

    Is there a way to fetch it in the $page context ?
  5. NorbertH

    How do i get the label if i have overridden the label in the template ? I always get the original one from the field.
  6. NorbertH

    Still it would be great to have options like "modified>created" or "modified=created" in selectors . That would make it very comfortable. Maybe whith putting the second selector into some brackets, to mark it as selector and not value. "modified={created}" So possibly allowing sub selects in selectors. Edit: sub Selectors are already implemented .. http://processwire.com/api/selectors/
  7. NorbertH

    When Trying to install i get this error : It seems he is trying to load acfConfig.php while the file is called AcfConfig.php .
  8. Finally deleted all those pages using transactions: <?php namespace ProcessWire; include "index.php"; $dePages = wire('pages')->find("parent=/einstellungen/berufi/"); echo $dePages->count()."\n"; $i=0; try { $database->beginTransaction(); foreach ($dePages as $dePage){ echo $i++. " ".$dePage['title']."\n"; $dePage->delete(); } $database->commit(); } catch(\Exception $e) { $database->rollBack(); } Script took 7 Minutes to run , the actual query execution took about 7-10 seconds at the end of the script. I guess Transactions are helpfull at deleting pages too . What i did not try was to trash them first.
  9. The variant whithout transactions (and whithout save()) took about 45 seconds to run. Using transactions (not really using them as save() is commented out ) took about a 45 seconds to run too. Both throw an error: PHP Warning: touch(): Utime failed: Permission denied in /volume1/web/personalverwaltung/wire/core/FileCompiler.php on line 1063 Edit: The error message has nothing to to whith the scripts , just an issue whith the test server.
  10. Found a nice link about this topic: https://stackoverflow.com/questions/14675147/why-does-transaction-commit-improve-performance-so-much-with-php-mysql-innodb
  11. Hmm ok , did some testing . Testserver is a synology disk station whith 8 G ram. The import ccript is pretty simple : <?php namespace ProcessWire; include "index.php"; // Include PW include "berufe.php"; // Simple array with about 25000 Job names /* $berufe = array( array('id_beruf' => '1','berufsbezeichnung' => 'Aalbrutzüchter/in','kldb2010' => '11412'), array('id_beruf' => '2','berufsbezeichnung' => 'Aalfischer/in','kldb2010' => '11422'), array('id_beruf' => '3','berufsbezeichnung' => 'Aalräucherer/-räucherin','kldb2010' => '29242'), ... */ foreach ($berufe as $beruf){ echo $i++. " " .$beruf['kldb2010']." ".$beruf['berufsbezeichnung']."\n"; $p = new Page(); $p->template = 'berufsbezeichnung'; $p->parent = '/einstellungen/berufi/'; $p->title = $beruf['berufsbezeichnung']; $p->schluessel = $beruf['kldb2010']; $p->save(); } It took about 60 minutes to import using a PW installation whith Inno DB It took about 40 minutes using an installation whith MyIsam Now i changed the script to use transactions: <?php namespace ProcessWire; include "index.php"; // Include PW include "berufe.php"; // Simple array with about 25000 Job names try { $database->beginTransaction(); foreach ($berufe as $beruf){ echo $i++. " " .$beruf['kldb2010']." ".$beruf['berufsbezeichnung']."\n"; $p = new Page(); $p->template = 'berufsbezeichnung'; $p->parent = '/einstellungen/berufi/'; $p->title = $beruf['berufsbezeichnung']; $p->schluessel = $beruf['kldb2010']; $p->save(); } $database->commit(); } catch(\Exception $e) { $database->rollBack(); } On InnoDB using transactions the script finished in about 10 Minutes. It seemed like the actual DB operation that happened after creating the transaction only took a few seconds, as the almost script imediately ended after the last echo. Possibly transactions are worth a closer look, if we do massive data handling.
  12. NorbertH

    Processwire 3.0.98 Calling /processwire/page/ Puts me in an endless loop. It redirects to processwire/page/?login=1 Over and over again.
  13. If i find some time i give it a try to import the pages whith transactions , maybe in 1000 entries blocks.
  14. Made a test installation whith MyIsam , was about 20% faster .
  15. I had imported about 10000 Pages (realy simple ones 2 text fields only ) into PW using child batch editor and it took about 1 hour whith multiple script timeouts. Moved em to trash but emtying the trash run into timeout again after about 10 minutes. So i started a bash php script ($page->emptyTrash()) but after half an hour it is still running. Pagetree shows only about 4000 Removed from trash right now. ProcessWire 3.0.98 Running on InnoDB (Mariadb 10) Any Ideas ?