Jump to content

ngrmm

Members
  • Posts

    481
  • Joined

  • Last visited

  • Days Won

    3

ngrmm last won the day on March 21 2024

ngrmm had the most liked content!

Contact Methods

  • Website URL
    https://www.engramm.com

Profile Information

  • Gender
    Not Telling
  • Location
    Germany

Recent Profile Visitors

7,849 profile views

ngrmm's Achievements

Sr. Member

Sr. Member (5/6)

203

Reputation

2

Community Answers

  1. does anyone know how to handle jumplinks and url-segments? can i do something like this: // redirect to success page $urlSeg1 = $input->urlSegment(1); if($urlSeg1 == "success") { $session->redirect("/go-to-page/success/"); } else { // jumplinks should do what it does } Right now, jumplinks do not work with templates having url segments active
  2. It was my fault. You have to uninstall and reinstall the module as you have hinted on github. Then the new fields are added to your language templates. So I did not not change anything in the code and it works
  3. @robert – yes line 118 is private static function convertGlossaryStringToArray(string $glossaryString = ''): array { – I'm afraid i don't know what and where the language-specific translate_glossary field is 🙂 – using DeepL API Free UPDATE: ahhh, I updated from an very old version and didn't know that you have to add fields to the language template. Trying now to find out how to edit a language template. UPDATE: my fault. You have to uninstall and reinstall the module. Then the new fields are added to your language templates. Thanks again!
  4. @robert thanks! I updated to 1.3 and still getting the same error. Is this maybe related to my empty DeepL Glossary ID field?
  5. @robert I' using PW 3.0.210 – Fluency 2.3 – Translate Page 1.1 Using Save + Translate runs into this: Uncaught TypeError: TranslateGlossary::convertGlossaryStringToArray(): Argument #1 ($glossaryString) must be of type string, null given, called in site/modules/ProcessTranslatePage/TranslateGlossary.php on line 34 and defined in site/modules/ProcessTranslatePage/TranslateGlossary.php:118 #0 site/modules/ProcessTranslatePage/TranslateGlossary.php (34): TranslateGlossary::convertGlossaryStringToArray() #1 site/modules/ProcessTranslatePage/TranslateGlossary.php (18): TranslateGlossary->createGlossary() #2 site/modules/ProcessTranslatePage/ProcessTranslatePage.module.php(169): TranslateGlossary->__construct() #3 site/modules/ProcessTranslatePage/ProcessTranslatePage.module.php(207): ProcessTranslatePage->initApi() #4 wire/core/WireHooks.php (1060): ProcessTranslatePage->hookTranslatePageSave() #5 wire/core/Wire.php (484): WireHooks->runHooks() #6 wire/core/PagesEditor.php (702): Wire->__call() #7 wire/core/PagesEditor.php (478): PagesEditor->savePageFinish() #8 wire/core/Pages.php (840): PagesEditor->save() #9 wire/core/Wire.php (419): Pages->___save() #10 wire/core/WireHooks.php (952): Wire->_callMethod() #11 wire/core/Wire.php (484): WireHooks->runHooks() #12 wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module (2128): Wire->__call() #13 wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module (563): ProcessPageEdit->processSave() #14 wire/core/Wire.php (413): ProcessPageEdit->___execute() #15 wire/core/WireHooks.php (952): Wire->_callMethod() #16 wire/core/Wire.php (484): WireHooks->runHooks() #17 wire/core/ProcessController.php (350): Wire->__call() #18 wire/core/Wire.php (413): ProcessController->___execute() #19 wire/core/WireHooks.php (952): Wire->_callMethod() #20 wire/core/Wire.php (484): WireHooks->runHooks() #21 wire/core/admin.php (160): Wire->__call() #22 wire/modules/AdminTheme/AdminThemeUikit/controller.php (15): require('/usr/www/users/...') #23 site/templates/admin.php (18): require('/usr/www/users/...') #24 wire/core/TemplateFile.php (328): require('/usr/www/users/...') #25 wire/core/Wire.php (413): TemplateFile->___render() #26 wire/core/WireHooks.php (952): Wire->_callMethod() #27 wire/core/Wire.php (484): WireHooks->runHooks() #28 wire/modules/PageRender.module (575): Wire->__call() #29 wire/core/Wire.php (416): PageRender->___renderPage() #30 wire/core/WireHooks.php (952): Wire->_callMethod() #31 wire/core/Wire.php (484): WireHooks->runHooks() #32 wire/core/WireHooks.php (1060): Wire->__call() #33 wire/core/Wire.php (484): WireHooks->runHooks() #34 wire/modules/Process/ProcessPageView.module (184): Wire->__call() #35 wire/modules/Process/ProcessPageView.module (114): ProcessPageView->renderPage() #36 wire/core/Wire.php (416): ProcessPageView->___execute() #37 wire/core/WireHooks.php (952): Wire->_callMethod() #38 wire/core/Wire.php (484): WireHooks->runHooks() #39 index.php (55): Wire->__call() #40 {main} thrown (Zeile 118 in site/modules/ProcessTranslatePage/TranslateGlossary.php)
  6. @spoetnik export/import works with multilanguage pages The new website has to have the same languages as the origin website. And you need to have the right paths for parents.
  7. UPDATE: I think I found a solution. You have to remove the InputfieldStateChanged class from the field wrapper after your AJAX changes. function resetFieldState(fieldId) { const wrap = document.querySelector(`#wrap_${fieldId}`); if (wrap?.classList.contains('InputfieldStateChanged')) { wrap.classList.remove('InputfieldStateChanged'); } } // then use resetFieldState('Inputfield_your_fieldname') after your ajax code
  8. I’m working on a custom runtime markup field in ProcessWire’s admin. This field loads DOM elements asynchronously after the page loads (via JavaScript), updating part of the form visually. The problem: When I try to leave the page without actually changing any form inputs, the "There are unsaved changes, are you sure you want to leave?" prompt still appears. I suspect ProcessWire's admin JavaScript is detecting these DOM changes, but I’m unable to find which JS object or event is responsible. Can anyone share how ProcessWire’s admin detects changes or how to override/reset that state? Or pointers on what JS objects or events to manipulate? Thanks a lot in advance!x
  9. @tires I can't help you with the htaccess But you could just use ProtectedMode https://processwire.com/modules/protected-mode/
  10. @kaz beware // hreflang="english" is not valid // it should be hreflang="en" <link rel="alternate" hreflang="en" href="https://domain.local:8890/en/services/" />
  11. this is how I did it // Output a default alternate link for search engines that don't support hreflang echo "<link rel='alternate' hreflang='x-default' href='$page->httpUrl' />"; // Loop through all available languages foreach($languages as $language) { if(!$page->viewable($language)) continue; $url = $page->localHttpUrl($language); $hreflang = $language->name; // Replace "default" with "de" (assumes "de" is the default language) $hreflang = ($hreflang == 'default') ? "de" : $hreflang; // Output the alternate link for the current language echo "<link rel='alternate' hreflang='$hreflang' href='$url' />"; }
  12. I'm not sure if this works via the field in the backend, but you could handle it with a hook. https://processwire.com/api/ref/form-builder-processor/email-form/
  13. I meant something else. You're using FormBuilder, which offers four different options (A, B, C, and D) to embed your form into a template or page. For example, if you use option D, you're implementing custom code, and the rendering is not handled by FormBuilder. In that case, the hook would have no effect.
  14. which embed type are you using?
  15. @bernhard that was it, thanks a lot!
×
×
  • Create New...