-
Posts
50 -
Joined
-
Last visited
Everything posted by herr rilke
-
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
-
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)
-
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
-
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)
-
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?
-
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
-
mod_rewrite is in place but no entries in the log.file
-
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?
-
[Solved] Use checkbox array in block settings
herr rilke replied to herr rilke's topic in RockPageBuilder
[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 ? -
[Solved] Use checkbox array in block settings
herr rilke replied to herr rilke's topic in RockPageBuilder
sound's weired - that came to my mind, too - but i'm not allowed to do so. <feeling completely foolish /> -
[Solved] Use checkbox array in block settings
herr rilke replied to herr rilke's topic in RockPageBuilder
perfect! thank you! btw: where's the [mark as solved] button ?? -
[Solved] Use checkbox array in block settings
herr rilke replied to herr rilke's topic in RockPageBuilder
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 ? -
[Solved] Use checkbox array in block settings
herr rilke replied to herr rilke's topic in RockPageBuilder
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: -
RockPageBuilder: strange WYSIWYG editor behavior
herr rilke replied to herr rilke's topic in Modules/Plugins
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. -
[Solved] Use checkbox array in block settings
herr rilke replied to herr rilke's topic in RockPageBuilder
-
[Solved] Use checkbox array in block settings
herr rilke replied to herr rilke's topic in RockPageBuilder
wow, that is very beautiful! works like a charm - thank you! -
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?
-
RockPageBuilder: strange WYSIWYG editor behavior
herr rilke replied to herr rilke's topic in Modules/Plugins
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, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; 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. -
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?
-
using markup regions prints content of template as text
herr rilke replied to herr rilke's topic in General Support
?that was too easy ? thanks, i was blind ? -
using markup regions prints content of template as text
herr rilke posted a topic in General Support
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