Jump to content

noodles

Members
  • Posts

    18
  • Joined

  • Last visited

Everything posted by noodles

  1. Anyone any clue? I still have no idea how to achieve this. ?
  2. Hey there, I need to populate and save the custom fields (e.g. "title") via API, which works perfectly fine for the default language. However, I can't manage to populate other languages. So far I tried: $img->title427468 = 'Hello Wereld'; $img->save(); Nothing is saved. Other notations Another approach: $languages->setLanguage('dutch'); $img->title = 'Hello Wereld'; $img->save(); This indeed saves "Hello Wereld" to the dutch custom title field, BUT however DELETES the content in the default title field. The "setLanguageValue"-function is non-existent for the images/files, so it doesn't help. Can anyone help? ? Thank you very much. ❤️
  3. Hey there, we recently took over a ProcessWire project from a different agency, since the client wanted to work with us now. We experienced a weird behaviour and I hope someone can explain it! ? The former agency used a ZebraForm class for formular building which worked/works fine on the clients server, but not on our staging system. The code within ZebraForm is: require rtrim(dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . 'languages/' . strtolower(trim($language)) . '.php'; The FileCompiler converts it to: require(\ProcessWire\wire('files')->compile(rtrim(dirname(\ProcessWire\wire("config")->paths->root . 'site/templates/assets/zebra-form/Zebra_Form.php'),array('includes'=>true,'namespace'=>true,'modules'=>true,'skipIfNamespace'=>true)), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . 'languages/' . strtolower(trim($language)) . '.php'); Error message: Warning: rtrim() expects parameter 2 to be string, array given in /var/www/[...]/site/assets/cache/FileCompiler/site/templates/assets/zebra-form/Zebra_Form.php on line 1076 So to check what went wrong, we changed the syntax within the ZebraForm class to: require rtrim( dirname(__FILE__), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . 'languages/' . strtolower(trim($language) ) . '.php'; So basically, we put it in new rows... No big deal, no magic. ? The FileCompiler now converts it to: require rtrim( dirname(\ProcessWire\wire("config")->paths->root . 'site/templates/assets/zebra-form/Zebra_Form.php'), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . 'languages/' . strtolower(trim($language) ) . '.php'; Et voila, it works now! Does anyone have any idea why this happened? Asking out of curiosity! Thank you! Niko
  4. Holy shit! That was fast. Thank you very much, Robin!
  5. Hey there, anyone has an idea how to get the HannaDropdown running within a ProFields Table field? I've got a reference to a FieldtypeTextarea with CKEditor where everything is working absolutely perfect, but the HannaDropdown won't show within the inline Editor of the table field. Any clue? ? Thanks, Niko
  6. If I see it correctly, the "other field columns" will be added on a save hook via the $input->post data - which I don't have in my case. In line 1213 it looks like I will have to alter the table in my script. ? Damn! ? Any sweeter way known by someone?
  7. Hey there, I create all my fields with the Migrations module, so I create all my fields with the core functions. Sadly, I'm having trouble creating "otherField" information with ImageExtra. If I try this, the whole field is broken: $myField = $fields->get('test_field'); $myField->otherField = 'copyright'; $myField->otherFieldSettings = "{\"cf_textformatter\":{\"copyright\":\"\"},\"cf_label\":{\"cf_label__copyright\":\"Copyright\"}}"; $myField->save(); Or with an array: $myField = $fields->get('test_field'); $myField->otherField = 'copyright'; $myField->otherFieldSettings = [ 'cf_textformatter' => [ 'copyright' => '' ], 'cf_label' => [ 'cf_label__copyright' => '' ] ]; $myField->save(); I always get this error: ProcessWire: ProcessPageEdit: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_test_field.copyright' in 'field list' Has anyone made any experience with this? Suggestions? ? Thanks in advance!
  8. Hey there, I am trying to install the LanguageSupport module via $modules->install('LanguageSupport') but it won't work. Next time I log in, there's this error: Failed module dependency: ProcessLanguage requires LanguageSupport +1 Failed module dependency: ProcessLanguageTranslator requires LanguageSupport Seems like the "languages" page, the templates and fields are all there, but somehow the Process couldn't be installed. This is the only core module I'm having problem with, if I try to install it via core functions and not the backend. Any hints?
  9. Anyone else experiencing this issue with the UiKit backend? :-( Any fixes?
  10. Hi there, I am trying to move all Repeater fields to PageTable fields at one of our projects. One of my Repeater fields contains Table fields (FieldtypeTable, from the ProFields package) and I somehow can't move the contents from a specific Repeater item to the destination Page. A simple $newPage->tableField = $repeaterElement->tableField; doesn't work. Anyone got any ideas? Thanks!
  11. Our client's hoster (1&1) does not support ImageMagick natively, so I installed your CLI module and pointed to the directory where the executables were uploaded. I checked with a short PHP script if the executable really are executable and everything worked fine so far. The module's priority was set to 0. However, the upload still crashes due to allowed memore issues and the error routes to ImageSizerEngineGD.php :-( Any suggestions?
  12. Hi Horst, thank you for your instant feedback. My server doesn't have ImageMagick, so I uploaded the executables and installed your ImageSizerEngineIMagickCLI module. However, the error still routes to the ImageSizerEngineGD.php Do I have to configure something elsewhere? Sorry if this is a dumb question. Oh, and disabling the thumbnails didn't help. No max dimensions set.
  13. Just hopping in on this topic. I struggle with a webspace that has a 128M limit and I am trying to upload a picture with 2848x4272 pixels. The upload got stuck at 100%. Crawling through the console and error logs, I found out that it is a memory limit issue. PW would have liked 2MB more. ;-) It's running on PW 3.0.11 and the error leads back to ImageSizerEngineGD.php:294 protected function imRotate($im, $degree) { $degree = (is_float($degree) || is_int($degree)) && $degree > -361 && $degree < 361 ? $degree : false; if($degree === false) return $im; if(in_array($degree, array(-360, 0, 360))) return $im; return @imagerotate($im, $degree, imagecolorallocate($im, 0, 0, 0)); } I just set autoRotate to false and now the upload works. Is this a miscalculation? Any recommendations for a proper workaround, like rotating afterwards, when the upload is finish? I don't know if this could solve this problem. Tried with both, a "regular" Image field and CroppableImage (which I still love, thanks Horst! )
  14. Yep, sadly. Does anyone know a fix? I would like to use PW 3, but I need CroppableImage.
  15. Hey Horst, I tried to save my thumbnail settings and got this error: Session: Table 'xxx.field_sliderImage' doesn't exist SELECT pages_id,count(pages_id) FROM field_sliderImage GROUP BY pages_id ORDER BY pages_id So I looked into your code and found this one in FieldtypeCroppableImage.module:339: $TABLE = 'field_' . $field->name; // TODO: name to lowercase To answer your question: Probably. Currently working with a hoster who's obviously case sensitive. I saw the table name was field_sliderimage (all lowercase) and edited your code to this: $TABLE = 'field_' . strtolower($field->name); // TODO: name to lowercase N: Yes! ;-) And yep, it worked! noodles
  16. Sorry for my late reply. I skipped this module by now and deleted the code. Just in case it's of any more interest: My module did nothing, but set the editLink to true. Once I find this code (which I dount), I'll post it.
  17. Hey folks, Not totally new to ProcessWire, but new to the forum. First things first: Thanks for a brilliant community. I've been reading through this forum a lot, but never ever posted anything. I hope to contribute and help in the future. For now, here is my problem: I've got a page field (InputfieldAsmSelect) and wrote a module to enable the editLink option via a hook. Works like a charm so far. But as soon as I try to delete the page within the modal - no matter whether I use the button in the modal footer or the checkbox within the ProcessPageEditDelete tab - nothing happens. The modal closes and it even saves changes, but it totally ignores the "Confirm" checkbox. Bug or a feature? Can anyone help? I really need to delete the whole page from this point. Thanks in advance. Yours, Noodles
×
×
  • Create New...