
maetmar
Members-
Posts
60 -
Joined
-
Last visited
Everything posted by maetmar
-
this is what I was able to find out, I hope it helps if an admin is loged in the backend and you have another tab open with the frontend --> no issue if an admin is loged in the backend and you have another inqognito window open with frontend --> error if no one is loged intp the backend and you have any session open with frontend --> error
-
Hi @bernhard, I found an issue with the livereload feature. When enabled, I get the following error message in chrome development console: "EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection." https://stackoverflow.com/questions/53591954/eventsources-response-has-a-mime-type-text-html-that-is-not-text-event-str It is reproducable, as soon as livereload is turned off, the error message is gone. The message is not causing any issues, as far as I can tell, but I was spending now a lot of time just to find out it was caused by livereload. So maybe you can check and make sure it gets fixed.
-
I got the Formbuilder working now with LATTE. Actually this works fine with latte: {$form} the problem was that I had to put this code into my _init.php: <?php $form = $forms->render('kontaktformular'); ?> in the documentation of the formbuilder it says put it in _init.php or on top of your template file. Firs, I put on top of my template file, which did not work, only after putting it into the _init.php it started producing output. But obviously also what Bernhard suggested worked fine.
-
I know. My question was more in the direction if LATTE allows to execute somehow native PHP code. the LATTE tags "PHP" or "DO" donΒ΄t really seems to do the job, at least no output is generated when using those. I would like to avoid creating a new PHP file which I need to include, just to run one line of code.
-
Now I want to add the first time the Formbuilder ProModule from Ryan together with RockFrontend latte files. One option to do this is normally you put these lines of code in your template: <?php echo $form->styles; ?> <?php echo $form->scripts; ?> <?php echo $form; ?> I somehow can not manage to get some output within a latte file. How do I properly run some PHP code within latte? I tried the below and nothing works / produces some output: {$form->scripts} {do $form->scripts} {php $form->scripts} using the tag "echo" is not allowed within latte, at least I get some exceptions. thanks again for any help / input
-
yes it worked before (Rockfrontend Version 2.1.11) without the noescape filters. When I upgrade to 2.7.1, I need to add them. there is a standard.php that has one line of code: <?= $rockfrontend->render('./standard.latte') ?> and the standard.latte looks like this now (the whole main body HTML content is rendered from ProField repater matrix): {$rockfrontend->render('includes/_head')|noescape} {$rockfrontend->render('includes/_header')|noescape} <!-- Render all Layout Blocks defined in page. Output derived from seperate output files --> {$rockfrontend->render($page->layout_blocks)|noescape} {$rockfrontend->render('includes/_footer')|noescape}
-
Hi @bernhard, on an existing page I have upgraded to the latest version of RockFrontend. I went to settings and saved (nothing activated or whatever). Now the output for anything coming from a .latte file is "destroyed". the sourcecode of my page in the browser looks like this: <!DOCTYPE html> <html lang="de"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="shortcut icon" href="style/images/favicon.png"> <title>Home - Website Name</title> <meta name="description" content="Website Description for SEO"> <link rel="stylesheet" href="/processwire/site/templates//assets/css/plugins.css"> <link rel="stylesheet" href="/processwire/site/templates//assets/css/style.css"> <link rel="stylesheet" href="/processwire/site/templates//assets/css/colors/ennemoser.css"> <link rel="stylesheet" href="/processwire/site/templates//assets/css/custom.css"> </head> ...... so basically all < and > characters have now been escaped to HTML entities. was there some change in between that I missed? I call the .latte files like this: {$rockfrontend->render('includes/_head')} is this call now wrong and I need to change something? thanks
-
PHP is for me unfortunately something that does not come very inuitive (so, I guess you know now I am by no means a hardcore developer). So itΒ΄s always time consuming with lots of trial and error to find (forum, google) code snippets that do what I want to do. Since I started using LATTE thanks to this thread and thanks to @bernhard and his RockFrontend module, it seems like a gamechanger for me. Processwire has become extremly more usefull and inutitive for me since. Thank you! I am currently rebuilding my code templates I use as starter-kits for new projects and convert them to LATTE. Does anyone have and is willing to share a skeleton template to build a nav-tree menu (mulitlevel) with LATTE? Something that produces similar HTML code like this: <ul class='navbar-nav'> <li class='nav-item active'> <a href='/processwire/' class='nav-link'>Home</a> </li> <li class='nav-item dropdown'> <a href='/processwire/kontakt/' class='nav-link dropdown-toggle'>Kontakt</a> <ul class='dropdown-menu'> <li class='nav-item'> <a href='/processwire/kontakt/kontakt-unterseite-a/' class='dropdown-item'>Kontakt Unterseite A</a> </li> </ul> </li> <li class='nav-item'> <a href='/processwire/seite-b/' class='nav-link'>Seite B</a> </li> </ul>
-
this is one error I can see when activiating your module (I was wrong, its not related to the scripts/css tag), but still something I found: In my main template I have this entry on top: <?php /* Include Header File */ wireIncludeFile("./_header"); ?> when I now activate your module, I see the following error on the very top of the source code that is generated, although it loads and includes _header.php: <br /> <b>Notice</b>: Undefined index: func in <b>/xxxx/xxxx/processwire/wire/core/WireFileTools.php</b> on line <b>1572</b><br /> when I turn off your module, the error is gone. UPDATE: if I use your tag instead it works and I guess that is the whole point of using your module to use your render method. <?= $rockfrontend->render('./_header') ?>
-
I did watch the video and then started to try it out, because I like what this module is able to do. Don't get me wrong. This is your module and I am not in the position and its not my intention to criticize it in any way. From what I can tell until now is that your module seems to be (or will be soon if further features are added) a bit of a "swiss army knife" for front-end development. So I just thought it would make sense to be able to turn on / off some of the features as not everyone is probably going to use all features at the same time. But again, this is your module and it's your call how it should work!
-
thanks Bernhard, What is a bit confusing to me is the fact, that if you don't put "$rockfrontend->styles()...." into your template, it still seems to be somehow called and involved (the fact that I got the comment in the HTML for example). In fact I even got some errors because I did not have it in my template. So, If I understand you correctly, in order to not use it or turn it off, I still need to put it into the template with the option autoload = false? Wouldn't it make more sense, to just load/use it if the tag is available at all and in all other cases, it simply is ignored and turned-off by default?
-
sorry, but I have a bit a stupid question. If I want to disable loading of styles or srcipts or turn-off debug, but how do I actually achieve this? the produced HTML says this (see below): but where do I put this exactly. Can I use the config.php in the site folder and what exactly do I need to put in? I tried a couple of things, nothing worked. <!-- DEBUG enabled! You can disable it either via $config or use $rf->scripts()->setOptions(['debug'=>false]) --> <!-- autoloading of default scripts enabled - disable using ->setOptions(['autoload'=>false]) --> what I want to achieve is to have only the autorelead and the LATTE template engine working for me. So far, I donΒ΄t need to have all other features. Maybe this can be de-/activated in the configuration of the module in the future?
-
btw, donΒ΄t really need right now, but I realized this has the same issue with sub-folders (same for styles as well): echo $rockfrontend->scripts('body') ->add('site/templates/bundle/main.js') ->render(); ?> the URL added does not consider the sub-folders. you may want to fix this as well in your next release? thanks
-
Hi Bernhard, I have the following issue with livereload. I run a test installation in a sub-folder (not the root) - lik "custom-domain.com/processwire" Now the first time livereload is called it works, cause its called with the proper path "custom-domain.com/processwire/livereload.php", But the second time it fails with a 404 because the sub-folder is not considered anymore: "custom-domain.com/livereload.php" Any idea what I need to change? I have mod-rewrite set to correct path, but it must be something else. thanks
-
latest stable version: ProcessWire 3.0.200 run modules / refresh which brought this result, but its still not working: Modules: Found 3 module(s) missing file: FieldtypeNumber => /var/www/vhosts/...../httpdocs/site/modules/FieldtypeNumber/FieldtypeNumber.module MaintenanceMode => /var/www/vhosts/..../httpdocs/site/modules/MaintenanceMode/MaintenanceMode.module ProcessPage => /var/www/vhosts/...../httpdocs/site/modules/ProcessPage/ProcessPage.module ProcessModule: Modules cache refreshed (118 modules)
-
Everytime I try to access the logs via Setup/Logs and for example "errors" or "sessions" (or anyother of the existing entrys) I always get an exception like this: Darn⦠Schwerwiegender Fehler: Uncaught Error: Class "LogEntriesArray" not found in wire/modules/Process/ProcessLogger/ProcessLogger.module:418 #0 wire/modules/Process/ProcessLogger/ProcessLogger.module (309): ProcessLogger->renderLog() #1 wire/core/Wire.php (414): ProcessLogger->___executeView() #2 wire/core/WireHooks.php (951): Wire->_callMethod() #3 wire/core/Wire.php (485): WireHooks->runHooks() #4 wire/core/ProcessController.php (337): Wire->__call() #5 wire/core/Wire.php (414): ProcessController->___execute() #6 wire/core/WireHooks.php (951): Wire->_callMethod() #7 wire/core/Wire.php (485): WireHooks->runHooks() #8 wire/core/admin.php (160): Wire->__call() #9 site/templates/admin.php (16): require('...') #10 wire/core/TemplateFile.php (327): require('...') #11 wire/core/Wire.php (414): TemplateFile->___render() #12 wire/core/WireHooks.php (951): Wire->_callMethod() #13 wire/core/Wire.php (485): WireHooks->runHooks() #14 wire/modules/PageRender.module (575): Wire->__call() #15 wire/core/Wire.php (417): PageRender->___renderPage() #16 wire/core/WireHooks.php (951): Wire->_callMethod() #17 wire/core/Wire.php (485): WireHooks->runHooks() #18 wire/core/WireHooks.php (1059): Wire->__call() #19 wire/core/Wire.php (485): WireHooks->runHooks() #20 wire/modules/Process/ProcessPageView.module (184): Wire->__call() #21 wire/modules/Process/ProcessPageView.module (114): ProcessPageView->renderPage() #22 wire/core/Wire.php (417): ProcessPageView->___execute() #23 wire/core/WireHooks.php (951): Wire->_callMethod() #24 wire/core/Wire.php (485): WireHooks->runHooks() #25 index.php (55): Wire->__call() #26 {main} thrown (Zeile 418 in wire/modules/Process/ProcessLogger/ProcessLogger.module) On the serverlogs I see this: AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Class "ProcessWire\\LogEntriesArray" not found in /var/www/vhosts/.../httpdocs/wire/modules/Process/ProcessLogger/ProcessLogger.module:418\nStack trace:\n#0 /var/www/vhosts/..../httpdocs/wire/modules/Process/ProcessLogger/ProcessLogger.module(309): ProcessWire\\ProcessLogger->renderLog()\n#1 /var/www/vhosts/..../httpdocs/wire/core/Wire.php(414): ProcessWire\\ProcessLogger->___executeView()\n#2 /var/www/vhosts/..../httpdocs/wire/core/WireHooks.php(951): ProcessWire\\Wire->_callMethod()\n#3 /var/www/vhosts/..../httpdocs/wire/core/Wire.php(485): ProcessWire\\WireHooks->runHooks()\n#4 /var/www/vhosts/..../httpdocs/wire/core/ProcessController.php(337): ProcessWire\\Wire->__call()\n#5 /var/www/vhosts/..../httpdocs/wire/core/Wire.php(414): ProcessWire\\ProcessController->___execute()\n#6 /var/www/vhosts/..../httpdocs/wire/core/WireHooks.php(951): ProcessWire\\Wire->_callMethod()\n#7 /var/www/vhosts/haussonne.at/httpdoc...', referer: https://haussonne.at/processwire-haus-sonne/setup/logs/ any idea what could have caused this? Unfortunately I do not know if this worked from the beginning or not, as I didn´t check until now. Other from this I have no issues with the website. So in theory I could also ignore it, but I rather have this fixed if possible.
-
@kongondo, thanks for letting me know. Will check your module next time. In the meantime I solved my problem just doing it manually by extending some of the default navtree templates, without the help of a module.
-
Hello, I would appreciate if someone could help solving the problem I have. I tried to find some code examples that might solve my issue, but have not been succesfull so far. The HTML I need to render is the following below. I manage to get all done, except I have no clue how I can have a different class ("other_class") for the "a" tag in the 2nd level of the menu. Any help is welcome. thanks <ul class="navbar-nav"> <li class="nav-item"><a class="nav-link" href="#">Menu A</a> </li> <li class="nav-item dropdown"><a class="nav-link dropdown-toggle" href="#">Menu B</a> <ul class="dropdown-menu"> <li class="nav-item"><a class="other_class" href="#">Subitem of Menu B</a></li> </ul> </li> </ul>