Github Pages Repo
baumrock / rockfrontend Goto Github PK
View Code? Open in Web Editor NEWTake your ProcessWire Frontend Development to the Next Level ๐๐
License: MIT License
Take your ProcessWire Frontend Development to the Next Level ๐๐
License: MIT License
I don't know how easy this would be - but could the livereload JS be included in error report pages (inc tracy) when in debug mode?
This would allow a change to the code that fixes the error to cause the page to reload - if the change doesn't fix the error, or produces a different one, then the error page will be suitably regenerated anyway.
On Multilanguage Websites the sitemap.xml is broken
Fix:
urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"
instead of
urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'
I have Rockfrontend 2.1.4 in a Processwire install and it seems to catch all the individual .less
files in the /templates/sections
folder automatically with this declaration in _main.php
$rockfrontend
->styles()->setOptions(['autoload'=>true])
->add("/site/templates/uikit-3.15.10/src/less/uikit.theme.less")
->add("/site/templates/styles/custom.less")
;
I have another Processwire site with Rockfrontend 2.12 and it doesn't catch any .less
files unless I add with the addAll
method.
$rockfrontend
->styles()->setOptions(['autoload'=>true])
->add("/site/templates/uikit-3.15.20/src/less/uikit.theme.less")
->addAll("/site/templates/sections")
->add("/site/templates/styles/custom.less")
;
How come it works in the first example but only with addAll
in newer version ?
Thanks
@BernhardBaumrock Hi Bernhard. Not sure if this is actually an issue or not, but I'm seeing intermittent issues with livereloads on the front end. Seems to be correlated with these notices in the console...
I will keep an eye out for more occurances and investigate further - but I'm starting to wonder if this is related to not being logged in to the admin interface at the same time as seeing these in the front end.
@BernhardBaumrock Hi Bernhard!
Curious about the https://github.com/baumrock/RockFrontend/blob/main/RockFrontend.afdesign file - presumably this is an affinity designer save that's been included in the download zip.
Could this be excluded from the installed files as things like this really don't need to end up in live sites when the module is installed?
Could you please add an .editorconfig file or something to define code formatting.
Otherwise submitting code changes could in a total reformatting-whitespace-disaster.
If you make a non-ajax call to an ajax endpoint as a guest user (so the helpful debug view is off) then the json that is returned has the Content-Type header set to text/html - which is incorrect as it's a json string.
However, if these are ajax endpoints, and the superuser debug display doesn't kick in, then would it be better to reply with a 403 or 404 status code? Anyway, the correct content type should be used here regardless of this decision, which devs may want some control over.
If the json has embedded html strings, then there can be issues. For example: create a file in ajax/foo.php and put the following in it:
<?php
return [
'<h1>baz</h1>',
];
Make sure you are logged out (or use an incognito tab) and visit your site's ajax/foo endpoint in a browser.
Hi,
Looking to see if I can specify more than a single template in renderIf method:
<?= $rockfrontend->renderIf("sections/includes/related-items.latte", "template=template1") ?>
would you simply rewrite the template declaration?
<?= $rockfrontend->renderIf("sections/includes/related-items.latte", "template=template1, template=template2") ?>
Thanks,
Hi Bernhard,
image_content_half
. Let's say I have filled its note field with value "Foo".text_image
which is using this image field. From the fields list for text_image
I have overriden the notes of the image_content_half
field to "Bar".{$rockfrontend->render($page->matrix)}
(/site/templates/fields/matrix/text_image.latte)
I am calling Alfred for the particular field:...
<div class="bla" {alfred($page, ['fields'=> 'image_content_half'])|noescape}>
<img ...>
</div>
...
image_content_half
to show the override value "Bar" but instead it shows the original value "Foo"RockFrontend 2.9.1, RepeaterMatrix 0.0.8, ProcessWire 3.0.200
Am I missing something or is this a bug?
Thank you in advance.
Hello and thanks for your awesome module!
I'm getting the following error message inside ProcessWire error logs and am not sure how to proceed debugging it.
The error occurs permanently on every request.
I'm adding only one script inside _main.php like this:
...
<?= $rockfrontend->scripts('body')->add('/site/templates/assets/main.js')->render(); ?>
</html>
Fatal Error: Uncaught Error: Class "RockFrontend\ScriptsArray" not found in /site/modules/RockFrontend/RockFrontend.module.php:1545 Stack trace:
1. /site/modules/RockFrontend/RockFrontend.module.php(306): RockFrontend->scripts('head')
2. /site/modules/RockFrontend/RockFrontend.module.php(1107): RockFrontend->addLiveReloadScript()
3. /site/modules/RockFrontend/RockFrontend.module.php(205): RockFrontend->livereload()
4. /wire/core/Modules.php(722): RockFrontend->ready()
5. /wire/core/Modules.php(823): Modules->readyModule(Object(RockFrontend))
6. /wire/core/ProcessWire.php(766): Modules->triggerReady()
7. /wire/core/Wire.php(414): ProcessWire->___ready()
8. /wire/core/WireHooks.php(951): Wire->_callMethod('___ready', Array)
9. /wire/core/Wire.php(485): WireHooks->runHooks(Object(ProcessWire), 'ready', Array)
10. /wire/core/ProcessWire.php(888): Wire->__call('ready', Array)
11. /wire/core/ProcessWire.php(647): ProcessWire->__call('ready', Array)
12. /wire/modules/Process/ProcessPageView.module(511): ProcessWire->setStatus(4, Array)
13. /wire/core/Wire.php(414): ProcessPageView->___ready()
14. /wire/core/WireHooks.php(951): Wire->_callMethod('___ready', Array)
15. /wire/core/Wire.php(485): WireHooks->runHooks(Object(ProcessPageView), 'ready', Array)
16. /wire/modules/Process/ProcessPageView.module(165): Wire->__call('ready', Array)
17. /wire/modules/Process/ProcessPageView.module(114): ProcessPageView->renderPage(Object(HomePage), Object(PagesRequest))
18. /wire/core/Wire.php(417): ProcessPageView->___execute(true)
19. /wire/core/WireHooks.php(951): Wire->_callMethod('___execute', Array)
20. /wire/core/Wire.php(485): WireHooks->runHooks(Object(ProcessPageView), 'execute', Array)
21. /var/www/html/processwire/index.php(55): Wire->__call('execute', Array) #21 {main} thrown
Line 1545 of /site/modules/RockFrontend/RockFrontend.module.php
I can not get webfonts to work.
I am supposed to write the full url?
When I try to write https://fonts.google.com/specimen/Roboto, I get this error:
I think this is the same thing that GornyCreative mentioned in
but I thought it worth logging here as well.
When I installed RockFrontend just now on an up to date version of PW (although a duplicated site rather than a fresh install) it dies with a fatal error 'Call to member function getFiles() on null' (screenshot attached).
Just wrapping the foreach loop in a conditional that checks for page lets me continue with no obvious problems ... so far :-)
if(isset($page) && $page){ foreach ($page->getFields() as $field) { if (!array_key_exists($field->name, $vars)) continue; unset($vars[$field->name]); } }
Thanks for all your work on this and all things PW of course.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.