Jump to content

kaz

Members
  • Posts

    269
  • Joined

  • Last visited

Everything posted by kaz

  1. @flydev ?? unfortunately it did not work edit: a typing error, I revise: it works! if ($page->hero_items->count):
  2. @bernhard Good idea, but: I have tested TracyDebugger, it is too complicated for me.
  3. I have a repeater field hero_items that I use for hero images. If no image is uploaded, an image field (settings_hero_image) from the global settings should be displayed. Unfortunately that does not work. The code for the data is correct. If the parts are single (hero_items or settings_hero_image) the images will be displayed. If no image is uploaded under hero_items, the browser code looks blank. Actually, else should now be displayed. If images are uploaded, the source code is correct. What is wrong with my if else query?
  4. @Andi I will try that, thanks! Addendum: works great with PHP > 8
  5. I' ve changed the PHP version localhost from 7.4.21 to 8.1.1. When I make a change in the editor (e.g. in pages), this error message comes up: Fatal error: Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, string given in site/modules/FieldtypeLeafletMapMarker/InputfieldLeafletMapMarker.module:193 #0 site/modules/FieldtypeLeafletMapMarker/InputfieldLeafletMapMarker.module (193): round('', 4) #1 wire/core/Wire.php (417): Processwire\InputfieldLeafletMapMarker->___processInput(Object(WireInputData)) #2 wire/core/WireHooks.php (951): Wire->_callMethod('___processInput', Array) #3 wire/core/Wire.php (485): WireHooks->runHooks(Object(Processwire\InputfieldLeafletMapMarker), 'processInput', Array) #4 wire/core/InputfieldWrapper.php (1137): Wire->__call('processInput', Array) #5 wire/core/Wire.php (417): InputfieldWrapper->___processInput(Object(WireInputData)) #6 wire/core/WireHooks.php (951): Wire->_callMethod('___processInput', Array) #7 wire/core/Wire.php (485): WireHooks->runHooks(Object(InputfieldFieldsetOpen), 'processInput', Array) #8 wire/core/InputfieldWrapper.php (1137): Wire->__call('processInput', Array) #9 wire/core/Wire.php (417): InputfieldWrapper->___processInput(Object(WireInputData)) #10 wire/core/WireHooks.php (951): Wire->_callMethod('___processInput', Array) #11 wire/core/Wire.php (485): WireHooks->runHooks(Object(InputfieldFieldsetOpen), 'processInput', Array) #12 wire/core/InputfieldWrapper.php (1137): Wire->__call('processInput', Array) #13 wire/core/Wire.php (417): InputfieldWrapper->___processInput(Object(WireInputData)) #14 wire/core/WireHooks.php (951): Wire->_callMethod('___processInput', Array) #15 wire/core/Wire.php (485): WireHooks->runHooks(Object(InputfieldWrapper), 'processInput', Array) #16 wire/core/InputfieldWrapper.php (1137): Wire->__call('processInput', Array) #17 wire/modules/Inputfield/InputfieldForm.module (189): InputfieldWrapper->___processInput(Object(WireInputData)) #18 wire/core/Wire.php (417): InputfieldForm->___processInput(Object(WireInputData)) #19 wire/core/WireHooks.php (951): Wire->_callMethod('___processInput', Array) #20 wire/core/Wire.php (485): WireHooks->runHooks(Object(InputfieldForm), 'processInput', Array) #21 wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module (2203): Wire->__call('processInput', Array) #22 wire/core/Wire.php (417): ProcessPageEdit->___processInput(Object(InputfieldForm)) #23 wire/core/WireHooks.php (951): Wire->_callMethod('___processInput', Array) #24 wire/core/Wire.php (485): WireHooks->runHooks(Object(ProcessPageEdit), 'processInput', Array) #25 wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module (2009): Wire->__call('processInput', Array) #26 wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module (563): ProcessPageEdit->processSave() #27 wire/core/Wire.php (414): ProcessPageEdit->___execute() #28 wire/core/WireHooks.php (951): Wire->_callMethod('___execute', Array) #29 wire/core/Wire.php (485): WireHooks->runHooks(Object(ProcessPageEdit), 'execute', Array) #30 wire/core/ProcessController.php (337): Wire->__call('execute', Array) #31 wire/core/Wire.php (414): ProcessController->___execute() #32 wire/core/WireHooks.php (951): Wire->_callMethod('___execute', Array) #33 wire/core/Wire.php (485): WireHooks->runHooks(Object(ProcessController), 'execute', Array) #34 wire/core/admin.php (160): Wire->__call('execute', Array) #35 wire/modules/AdminTheme/AdminThemeUikit/controller.php (15): require('/Users/dylan/Si...') #36 site/templates/admin.php (15): require('/Users/dylan/Si...') #37 wire/core/TemplateFile.php (327): require('/Users/dylan/Si...') #38 wire/core/Wire.php (414): TemplateFile->___render() #39 wire/core/WireHooks.php (951): Wire->_callMethod('___render', Array) #40 wire/core/Wire.php (485): WireHooks->runHooks(Object(TemplateFile), 'render', Array) #41 wire/modules/PageRender.module (575): Wire->__call('render', Array) #42 wire/core/Wire.php (417): PageRender->___renderPage(Object(HookEvent)) #43 wire/core/WireHooks.php (951): Wire->_callMethod('___renderPage', Array) #44 wire/core/Wire.php (485): WireHooks->runHooks(Object(PageRender), 'renderPage', Array) #45 wire/core/WireHooks.php (1059): Wire->__call('renderPage', Array) #46 wire/core/Wire.php (485): WireHooks->runHooks(Object(Page), 'render', Array) #47 wire/modules/Process/ProcessPageView.module (184): Wire->__call('render', Array) #48 wire/modules/Process/ProcessPageView.module (114): ProcessPageView->renderPage(Object(Page), Object(PagesRequest)) #49 wire/core/Wire.php (417): ProcessPageView->___execute(true) #50 wire/core/WireHooks.php (951): Wire->_callMethod('___execute', Array) #51 wire/core/Wire.php (485): WireHooks->runHooks(Object(ProcessPageView), 'execute', Array) #52 index.php (55): Wire->__call('execute', Array) #53 {main} thrown (Line 193 in site/modules/FieldtypeLeafletMapMarker/InputfieldLeafletMapMarker.module) I set back the PHP to 7.4.21, now I don't have an error. Just for information for the developer, PHP 8 is causing problems, at least for me. Maybe it's only me?
  6. if we know "how"; thanks for your support!
  7. Sorry for the confusion. Both are loaded above the closing body, in that order: UIkit.modal('#modal-center') .show(); script src="<?=urls()-> I just wanted to point out that both are above the closing /body. The <div id="modal-center" class="uk-flex-top" … is directly below the body tag. That was bad planning on my part. Of course I can only call a function when the script containing the function has been loaded before. I have now solved it this way: <script src="<?=urls()->templates?>assets/uikit/js/uikit.min.js"></script> <script src="<?=urls()->templates?>assets/uikit/js/uikit-icons.min.js"></script> <?php if ($page->id == 1 ): ?> <script> UIkit.modal('#modal-center') .show(); </script> <?php endif; ?> That works fine. I have defined a query for Home, because the window may only be called up one time when loading the website. It will be an information window with medical advice. It would be great if it were only displayed once, but that is probably not possible with the UIKit function. I didn't understand your explanation with ready.php, would the procedure make more sense? Or is document.ready callback different from the ready.php ?
  8. Hi @bernhard, I load the scripts <script src="/site/templates/assets/uikit/js/uikit.min.js"></script> <script src="/site/templates/assets/uikit/js/uikit-icons.min.js"></script> </body> If I open the source code via Cmd + Option + U, the link is accessible, these scripts are loaded. I hope these are all the scripts I need for this function?
  9. I need a modal dialog when the page is loading. When I have the following code in a simple HTML file, the UIKit modal dialog works fine. <body> <div id="modal-center" class="uk-flex-top" uk-modal> <div class="uk-modal-dialog uk-modal-body uk-margin-auto-vertical"> <button class="uk-modal-close-default" type="button" uk-close></button> <h2 class="uk-modal-title">Headline</h2> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </div> </div> … <script> UIkit.modal("#modal-center").show(); </script> </body> When I put the code in PW, I get this error message: Uncaught ReferenceError: UIkit is not defined ReferenceError: "x" is not defined UIKit scripts are fully loaded, actually everything should fit?
  10. Hi @AndZyk, good to know, thanks for your help. I do not need the old log file, it was only important to me to have the log file in the future.
  11. I accidentally deleted the errors protocol in the Setup. I only wanted to delete the content, not the whole protocol. Is there a way to reactivate this? Under Wire::errors() I found the following. Usage: $notices = $wire->errors(); How do I use the code? Am I on the right path?
  12. @artfulrobot okay, I see ProFields: Page Table could be installed separately. I never noticed that, thanks! I have used Repeater Matrix before, now I will give Page Table a try.
  13. I know "ProFields Table", the "ProFields Page Table" I have not found after downloading the ProFields. Where can I find ProFields Page Table? How do I add these "Page Table" field?
  14. I deleted FieldtypeNumber from the database, the error message is finally gone. ProcessPage is present several times in the database: ProcessPageEdit ProcessPageList ProcessPageSort ProcessPageAdd Are these four entries the ProcessPage module? Can I delete this entries, will then the error message of the ProcessPage module disappear?
  15. ProcessWire 3.0.200 When I update under "Modules", I get the following error message: Found 2 module(s) missing file: FieldtypeNumber => /…/site/modules/FieldtypeNumber/FieldtypeNumber.module ProcessPage => /…/site/modules/ProcessPage/ProcessPage.module It is a duplicated page, the original has no error, and also not the named module files. What is missing here?
  16. yesterday I couldn't find anything suitable, now I found a solution $page->children() the question is answered, the adjustment to photo and title I will surely succeed
  17. I need to link child pages on a parent page. I like to link to a photo (an image field of the page) of the child page, to the title of the page and of course the link, the URL to the internal page. Is this possible, maybe with a selection of page/s? Example: Page Title Child Page image (an image field of the child page) some info text
  18. kaz

    customer login

    Client Login may not be detailed enough. ‚User management‘ would probably be the better term? Backend module user management: Add user: user (nameprename) is created, and user's page is created (user/nameprename) The user receives the login data (email, password) by mail. The content of the page is not managed by the user, the content is read-download-only, placed by me. It contains clients CI/CD data; downloads, logos, colors, fonts, … Data which are permanently requested, so I would like to make these data available to the customer online, on its own protected page, – available via a login page that redirects to the user/nameprename user page.
  19. kaz

    customer login

    The LoginRegister module doesn't exist anymore. I couldn't find it even with the search for Login, Login Register, LoginRegister and so on. It may have been removed because it has a Pro version?
  20. I need a customer login. After the login, the customer should be directed to a separate page which is set up for the customer with downloads, infos, especially for the customer. The Login Register Pro module seems to be suitable, but: I don't necessarily need the possibility for users to register themselves, because registration is is only for selected clients. Does anyone have experience with "customer login", how do you provide login to customers?
  21. A question about the Pro Shop module ProCache: I have read through what the module offers in the shop. I'm interested in HTML, CSS and JS Minification and Merge. That sounds great. How do I implement the whole thing? In the description I read: "No code changes to your site are required, just check the box to enable and it takes care of it for you. Thoguh should you prefer it, ProCache also provides API-functions for merge/minify that you can use from your template files." Does this mean that I don't have to make any changes to the code, ProCache minifies the structure of my website alone and temporarily, the full code of the css and templates remains? If I load templates from content blocks, different css and js files via src in my template, will it be minified in total? Are comments from HTML, PHP, JS and CSS files automatically removed? Does this work so easily, without any changes to the code of my templates? Excuse my question, I just want to understand before I buy, whether the module is worth the price for my need.
  22. If I need content into one page I call the id if ($page->id == 1042 ): When I need these content on a second page, is it possible to add a second id? Or need the line to be duplicated, then it would be nested.
  23. @Jan Romero "since" I added only for understanding, it's not the original content. It's not about birthdays, it's for company anniversaries like this: …, we have placed great value on personal advice for [[count_years]] years … therefore it is important that the full date Y-M-D added up the year.
  24. Great, and I don't need the entry in the Attributes Panel. Thanks!
  25. Hi, I would like to output the distance between a defined date and today in years. Example: 1980-07-01 (y-m-d) and today (current date, without time) calculate and echo via Hanna code. <?php $start = date('Y', strtotime($start)); $diff = date('Y')-$start; echo $diff; Attributes: start=1980 Page: <p>Hannah Code Test: since [[count_years]] years</p> count_years is the name of the Hanna Code. In my test, I tried it only with years, the result is: since 0 years so I had to put the month and day back for now. Code type is PHP code. I think the problem could be the PHP strtotime function? Maybe someone has calculated the distance in years between a fixed date and the current date with Hanna code, and might be able to help?
×
×
  • Create New...