Jump to content

herr rilke

Members
  • Posts

    50
  • Joined

  • Last visited

Everything posted by herr rilke

  1. yeeees! me, me, me, me, MEEEEE 🙂 please do let us know! as an contao-webmaster i solve this by using custom classes an editor is able to choose from per section - looks a little like your approach
  2. thank you @da² for the code optimization! but why it was not saving correctly was an issue with the context foreach ($page->children("include=hidden") as $child) { ... } in that case it must be $child->of(false); $child->sammelband_verweis = $matchingPage->id; //$newArray; $child->save('sammelband_verweis'); (instead of $page) ! problem solved (the only problem was kind of blind in front of the screen)
  3. hi everyone, after importing 1500 pages from CSV I want to set the value of a page reference field. the recordsets hav a field called "sammelband" containing a string of the title i am looking for. what i want to achive is to find a page with that name and to save the page as a page reference. because the it is possible to link to that page later on in the output. both fields are in the same template "publikation". the pages are set hidden. the problem seems to occur in the saving part of the script. all paramenters work like expected - except that the page / value is not stored in the database. i'm using processwire 3.0.240 and the following code in the parentpage: foreach ($page->children("include=hidden") as $child) { if (! empty($child->sammelband_text)){ // doing some sanitation to the field's content $SammlungTitel = extractTitleAfterYear($child->sammelband_text); $escapedTitle = $sanitizer->selectorValue($SammlungTitel); $matchingPages = $pages->find("template=publikation, include=hidden, title^=$escapedTitle"); if ($matchingPages->count() > 0) { // die erste gefundene Seite (falls es mehrere geben sollte) $matchingPage = $matchingPages->first(); // Setze den Verweis im Feld "sammelband_verweis" $page->of(false); $page->sammelband_verweis = $matchingPage; // Debugging nach Zuweisung //bd($page->sammelband_verweis->id, 'Sammelband Verweis ID'); $page->save('sammelband_verweis'); echo '<hr>'; } } the configuration of the page reference field (auto generated by rockmigrations): 'sammelband_verweis' => [ 'addable' => '', 'allowUnpub' => 1, 'collapsed' => 0, 'columnWidth' => 100, 'derefAsPage' => 2, 'distinctAutojoin' => true, 'findPagesSelect' => '', 'findPagesSelector' => '', 'flags' => 0, 'inputfield' => '_InputfieldPageAutocomplete', 'label' => 'Sammelband', 'labelFieldFormat' => '', 'labelFieldName' => 'title', 'operator' => '%=', 'parent_id' => '/publikationen/', 'required' => '', 'requiredIf' => '', 'searchFields' => 'title', 'showIf' => '', 'tags' => 'publikation', 'template_id' => 'publikation', 'template_ids' => '', 'themeBorder' => '', 'themeColor' => '', 'themeOffset' => '', 'type' => 'FieldtypePage', ] any ideas would be highly appreceated
  4. good morning @bernhard, thanks for your fast response. line #18 is just what you see in the code #16 <div id="content"> #17 Homepage content #18 <?php echo $rockpagebuilder->render() ?> #19 #20 </div>
  5. hi @bernhard, trying to set up RPB 5.5.4 in PW 3.0.240 there's no working site "out of the box" after installation, regardless the site template i use. <div id="content"> Homepage content <?php echo $rockpagebuilder->render() ?> </div> gives the mentioned error Fatal Error: Uncaught Error: Call to a member function render() on string in C:\wamp64\www\oh1\site\modules\RockFields\RockPageBuilder.module.php:1535 Stack trace: #0 C:\wamp64\www\oh1\site\templates\home.php(18): RockPageBuilder->render() #1 C:\wamp64\www\oh1\wire\core\TemplateFile.php(328): require('C:\\wamp64\\www\\o...') #2 C:\wamp64\www\oh1\wire\core\Wire.php(413): TemplateFile->___render() #3 C:\wamp64\www\oh1\wire\core\WireHooks.php(968): Wire->_callMethod('___render', Array) #4 C:\wamp64\www\oh1\wire\core\Wire.php(484): WireHooks->runHooks(Object(TemplateFile), 'render', Array) #5 C:\wamp64\www\oh1\wire\modules\PageRender.module(581): Wire->__call('render', Array) #6 C:\wamp64\www\oh1\wire\core\Wire.php(416): PageRender->___renderPage(Object(HookEvent)) #7 C:\wamp64\www\oh1\wire\core\WireHooks.php(968): Wire->_callMethod('___renderPage', Array) #8 C:\wamp64\www\oh1\wire\core\Wire.php(484): WireHooks->runHooks(Object(PageRender), 'renderPage', Array) #9 C:\wamp64\www\oh1\wire\core\WireHooks.php(1094): Wire->__call('renderPage', Array) #10 C:\wamp64\www\oh1\wire\core\Wire.php(484): WireHooks->runHooks(Object(HomePage), 'render', Array) #11 C:\wamp64\www\oh1\wire\modules\Process\ProcessPageView.module(184): Wire->__call('render', Array) #12 C:\wamp64\www\oh1\wire\modules\Process\ProcessPageView.module(114): ProcessPageView->renderPage(Object(HomePage), Object(PagesRequest)) #13 C:\wamp64\www\oh1\wire\core\Wire.php(416): ProcessPageView->___execute(true) #14 C:\wamp64\www\oh1\wire\core\WireHooks.php(968): Wire->_callMethod('___execute', Array) #15 C:\wamp64\www\oh1\wire\core\Wire.php(484): WireHooks->runHooks(Object(ProcessPageView), 'execute', Array) #16 C:\wamp64\www\oh1\index.php(55): Wire->__call('execute', Array) #17 {main} thrown as i am not able to setup RPB at all i wonder if PW 3.0.240 has an error (or - more likely - me myself & I)
  6. thank you for your time and explanation @bernhard! gonna get another solution. all the best
  7. i was looking for them by myself, couldn't figure out, where to look for them. currently my base was your example RPB website.
  8. hi @bernhard, i have a new website online using rockpagebuilder 5.5.3 while in edit-mode as administrator everything works nicely. but activation template caching PLUS visiting the page while not logged in i get a server-error 500. in PW exception log it reads variable @global-secondary-background is undefined in file /site/templates/RockPageBuilder/blocks/CallToAction/CallToAction.less in CallToAction.less on line 23, column 14 21| .uk-background-primary { 22| h3 { 23| color: @global-secondary-background !important; 24| } 25| .text { 26| color: white; In /site/modules/Less/wikimedia/less.php/lib/Less/Tree/Variable.php line 50 any ideas what went wrong?
  9. thank you! i found some entries in the PW exception log @wbmnfktr, not in apache's error.log! variable @global-secondary-background is undefined in file /site/templates/RockPageBuilder/blocks/CallToAction/CallToAction.less in CallToAction.less on line 23, column 14 21| .uk-background-primary { 22| h3 { 23| color: @global-secondary-background !important; 24| } 25| .text { 26| color: white; In /site/modules/Less/wikimedia/less.php/lib/Less/Tree/Variable.php line 50 i am going to fix this. lessons learned: PW exception log was the right place to look for
  10. mod_rewrite is in place but no entries in the log.file
  11. hi there, as soon as i setup caching for a template in PW backend i get error 500 in the frontend. im using ProcessWire 3.0.239 on PHP 8.2 is there anything i need to do before using caching?
  12. [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] [Solved] thank you ?
  13. sound's weired - that came to my mind, too - but i'm not allowed to do so. <feeling completely foolish />
  14. perfect! thank you! btw: where's the [mark as solved] button ??
  15. hi @bernhard as far as i see 5.5.3 is still not evailable. so maybe you just forgot to upload ("after a few minutes") - just a friendly reminder ?
  16. perfect, @bernhard ! thanks a lot, frontend output works fine, just tested it. but now i get while frontend editing: 6× PHP Warning: Undefined variable $k in ...\veraenderung\site\modules\RockFields\RockFields.module.php:342 plus two bullets @ radio fields in the block:
  17. thank you @Stefanowitsch - i pasted that styles in my _main.php but unfortunatly makes no differences. i'm using in the above example the CTA block from @bernhard example block. makes no difference if i call that from the page edit in backend or frontend editing in RPB.
  18. @bernhard ah ok, i see what you mean input is perfect output is not working ?
  19. wow, that is very beautiful! works like a charm - thank you!
  20. hi there, block setting is a fantatstic feature! i'd like to use it to assign severeal additional classes and therefore use several checkboxes in a row. output should be something like: margins: [ ] top [ ] bottom [ ] left a.s.o i tried something like this ( but that doesn't work): $settings->add([ 'name' => 'margin-checkbox', 'label' => 'Marging', 'value' => $field->input('margin-checkbox', 'checkbox', [ '*foo' => 'foo value', 'bar' => 'bar value', 'baz' => 'baz value', ]), ]); is there a way to do that?
  21. hello and thank you both for your ideas, the easiest first: browsers are not scaled. what i can see in the devtools is that for the h1 tag in the editor <div class="tox-collection__item-label"> <h1 style="font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, &quot;Noto Sans&quot;, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Noto Color Emoji&quot;; font-size: 32px; font-weight: bold; font-style: normal; text-decoration: none solid rgb(34, 34, 34); text-transform: none; color: rgb(34, 34, 34); background-color: rgba(0, 0, 0, 0); padding: 0px 2px; border: 0px none rgb(34, 34, 34); border-radius: 0px; outline: rgb(34, 34, 34) none 0px; text-shadow: none;"> Überschrift 1 </h1> </div> this css makes a difference: skin.min.css:1 @media only screen and (min-width: 768px) { .tox .tox-menu .tox-collection__item-label { overflow-wrap: break-word; word-break: normal; } } scaling the viewport to < 768px or deactivating overflow-wrap: break-word; shows at least the <h1> tag as i would expect it to.
  22. hey, im trying to set up a page using RockPageBuilder 5.4.4 on ProcessWire 3.0.239 in textedit fields i get a not so good places iconbar for editing text, that doesn't blend out, when not needing it: in firefox i get in a select the following problem: any hints for that?
  23. hi there, when useing markup regions, having config.php $config->useMarkupRegions = true; and in _main.php <div pw-replace="wegdamit"> <p>Text to replace</p> </div> and in template-file.php <?php ... ?> <div id="wegdamit"> <p>Hello World</p> </div> the output is the printed source code of _main.php as first on the page: /** * _main.php * Main markup file * * This file contains all the main markup for the site and outputs the regions * defined in the initialization (_init.php) file. These regions include: * * $title: The page title/headline * $content: The markup that appears in the main content/body copy column * what am i doing wrong? ProcessWire is 3.0.224
×
×
  • Create New...