-
Posts
211 -
Joined
-
Last visited
Everything posted by NorbertH
-
Maybe we should use empty() instead of isset?
-
Repeater isChanged not working when adding image
NorbertH replied to gebeer's topic in API & Templates
Having the same issue whith FieldtypeSecureFile . It simply does not Trigger isChanged after i override an image (only 1 document allowede in that field) -
$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.
-
Is there a way to fetch it in the $page context ?
-
How do i get the label if i have overridden the label in the template ? I always get the original one from the field.
-
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/
-
When Trying to install i get this error : It seems he is trying to load acfConfig.php while the file is called AcfConfig.php .
-
Importing pages and empting trash incredibly slow...
NorbertH replied to NorbertH's topic in General Support
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. -
Importing pages and empting trash incredibly slow...
NorbertH replied to NorbertH's topic in General Support
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. -
Importing pages and empting trash incredibly slow...
NorbertH replied to NorbertH's topic in General Support
Found a nice link about this topic: https://stackoverflow.com/questions/14675147/why-does-transaction-commit-improve-performance-so-much-with-php-mysql-innodb -
Importing pages and empting trash incredibly slow...
NorbertH replied to NorbertH's topic in General Support
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. -
Processwire 3.0.98 Calling /processwire/page/ Puts me in an endless loop. It redirects to processwire/page/?login=1 Over and over again.
-
Importing pages and empting trash incredibly slow...
NorbertH replied to NorbertH's topic in General Support
If i find some time i give it a try to import the pages whith transactions , maybe in 1000 entries blocks. -
Importing pages and empting trash incredibly slow...
NorbertH replied to NorbertH's topic in General Support
Made a test installation whith MyIsam , was about 20% faster . -
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 ?
-
When setting description fields to 0 the download links are not displayed in backend. ProcessWire 3.0.98
-
But still they got an append() and prepend() method ... prepend() even seems to remove files that are already in the original array , maybe that would be a nice feature for append () too? Maybe even an option to add custom keys , not just those md5 strings maybe like add($filename, $customkey). That would allow to make a method to add after a certain key like addAfter ($filename, $customkey, $afterkey). That would make it possible to add scripts in an nicely defined order.
-
As $config-scripts is a wire array objekt wouldnt it be easier to use : WireArray::prepend() WireArray::append() to controll if the new script is loaded first or last ?
-
Thanks to all , using notifications for now ?
-
Ok, if "dev talk " is the better place, some moderator hopefully moves this. Anyway thanks a lot !
-
Another issue is that the element is only faded , so if you have several warnings , they stull use up their space after they have faded. If you close em they are removed.
-
Cool that does it , but how i set animation time ?
-
UIKIT3 Docs: https://getuikit.com/docs/alert#component-options Seems to say that you can animate this using component options , but i really can't find out how. Trying to avoit to add to much custom scripts for just an alert.
-
Hi there I am using an UIKIT alert box in a frontend template: <div class="uk-alert-success uk-text-center" uk-alert> <a class="uk-alert-close" uk-close></a> <h3><?=$Success.$SuccessText?></h3> </div> It already has a close button , but i want it to disappear after some seconds even if you don't close it manually. UIKIT docs seem to say its possible , but i cannot find an example on how its done. Thanks in advance !