-
Posts
2,234 -
Joined
-
Last visited
-
Days Won
59
Everything posted by wbmnfktr
-
Using $page->render to render a specific template
wbmnfktr replied to neonwired's topic in General Support
It should. My example above will therefore look in /site/templates/_view/FILE.php - this works in about 99% of all cases. Sometimes... I don't know why it doesn't. In those rare cases I have to write render("./_view/..."). and need to add this ./ before the path. -
CKEditor custom styles work in frontend editor not backend
wbmnfktr replied to JayGee's topic in General Support
In addition to my previous post some more details about a problem I recently faced with myStyles.js. The browser console showed the following error: Uncaught Error: [CKEDITOR.resourceManager.add] The resource name "mystyles" is already registered. The template had 3 textarea fields but only one of these fields had a custom myStyles.js. After adding the custom myStyles.js to the other two fields everything worked as expected again. Maybe this detail helps in the future. -
Images resized to 0x0px for non - superusers
wbmnfktr replied to lecrackffm's topic in General Support
Can you post the code that is responsible for rendering/creating those images. Maybe there is a glitch in it. -
Weird... the favicon.ico thing works like this: The browser looks in certain places for certain files. The favicon.ico is expected here: https://www.domain.tld/favicon.ico and will be displayed if it exists. You can... nonetheless... define an alternative file as described above to change default behaviour or to show another file like a .png Sometimes browsers are kind of lazy and don't look for new files they either haven't found for a while or have already cached. So using another browser or adding a bookmark to your bookmark bar can help to trigger a reload/refresh.
-
Unexpected FileCompiler behaviour with "require"
wbmnfktr replied to noodles's topic in General Support
It might not be related to this issue here but you could try these two things... add namespace <?php namespace ProcessWire; ?> on the very first line use require_once instead of require -
That should work out pretty well... unless I'm missing an important detail here. But... to be very honest... in order to accomplish and maintain such a setup you should be at least an intermediate ProcessWire-user with some kind of experience. These multisite setups – either option 1 or 2 – bring their very own issues with them and you need to be able to handle those and the whole environment (the hosting and server setup) surrounding them. I'd recommend to set up an instance of ProcessWire for each client just to be safe. One mistake and all your clients would be down/see errors/or whatever. You could repackage customizations in modules and distribute those to each client. That's intermediate/advanced stuff as well but way more secure on a larger scale. If you just want to maintain different sites for yourself... play around and have fun.
-
It's even easier. Just add a favicon.ico (backend) to and a favicon.png (website) to your web root. For the real website you define something like <link rel="shortcut icon" href="/favicon.png" type="image/png"> While the website shows your .png the backend will show your .ico.
-
Using $page->render to render a specific template
wbmnfktr replied to neonwired's topic in General Support
Either what @bernhard said or your path is wrong. The last is the main thing I'm struggling quite often with. When I get my paths right it works as expected. Even with things from repeater/repeater matrix items. -
-
Ok... is test nowadays somehow... protected within page names? I know about issues in field names (back in version 2.whatever.x) but not in page names.
-
That's weird. Especially as most/all pages within Trash will be re-named.
-
How to create template file for Small Project walkthrough
wbmnfktr replied to AnshulK's topic in Getting Started
Ok... well... that's kind of easy as well - or it should be at least for you. As you used Bitnami there should be a dedicated Bitname folder somewhere now. C:\Bitnami User>Bitnami Something like that I guess - I'm not sure as I don't use Bitnami. But... within that default Bitnami project (ProcessWire) folder you will find a folder called site and within that a folder called templates. So... it might be C:\Bitnami\Processwire\site\templates -
You could edit the output in the template file and use the new $page->if() method. https://processwire.com/api/ref/page/if/ So there might be no real need in setting a real value. Add a note or description to tell and explain editors the field behaviour. You could define that default value somewhere in your config.php or even in a dedicated settings page to keep it editable - at least for superusers.
-
Does a clone/copy of that page end in a 403 as well? Are there any hooks or if/else statement in your template that check for specific user roles? Can you find more details in the logs?
-
How to create template file for Small Project walkthrough
wbmnfktr replied to AnshulK's topic in Getting Started
In that tutorial - look at step 8. The Template File Step 8 – Outputting dynamic data in your template file While still in the page editor from step 7, click the "View" link to see your page. Note that it still says "Happy planet" for type (rather than "Terrestrial planet") and "Millions of years" rather than "4.54 billion years". That's because the page is still being rendered with just the static data in it. We need to update the template file so that it recognizes the fields we added and outputs the values of those fields. Edit /site/templates/planet.php and replace the static text in there with tags like this, replacing field_name with the name of the field: -
In addition to that I wrote this: https://copypaste.pw/howto/author-box/ Maybe it helps or at least gives you directions.
-
If I remember correctly that has to be enabled in Mailchimp first. Allow someone to re-subscribe again.
-
301 are totally fine - for ProcessWire and Google. Nothing to worry about. Read next part - as you have almost nothing to do for this. ? The existing ProcessWire .htaccess file already has this in place. Uncomment two lines and you are ready to go. # ----------------------------------------------------------------------------------------------- # 13. OPTIONAL: Redirect users to the 'www.' version of the site (uncomment to enable). # For example: http://processwire.com/ would be redirected to http://www.processwire.com/ # ----------------------------------------------------------------------------------------------- # RewriteCond %{HTTP_HOST} !^www\. [NC] # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] You can just add those fields to the user template - which can be found in Setup > Templates (after enabling showing system templates). And of course you have to create those fields first - if not already created. Setup > Fields There you can create all kinds of fields. Text, textarea, image, whatever... I recommend doing the tutorials available here: https://processwire.com/docs/tutorials/ They will help you to understand ProcessWire. It's absolutely not a waste of time. Even as someone who never worked with ProcessWire, but having some basic knowledge in terms of PHP, can learn ProcessWire within a weekend.
-
One image is actually indexed... ? There are a few things you might want to change or at least take a closer look at. use only https:// and redirect to it choose prefered domain (see below) reduce page size drastically (~13MB is too large) and speed it up remove the preloader as it stays for hours fix your sitemap (as mentioned by @dragan) set up Google Search Console to figure out problems with your site add robots.txt (as mentioned above) and reference your sitemap and maybe add a nice favicon.ico Your site is available through 4 different addresses: http://lobo-taberna.de/ http://www.lobo-taberna.de/ https://lobo-taberna.de/ https://www.lobo-taberna.de/ Choose one. ? Reduce page size to ... way less than that.
-
Select Content From Pages Which Are Linked To Category
wbmnfktr replied to Liam88's topic in General Support
I might miss it but how do you add tags and categories to a page? If you are using a page field (PageReference) you could just find() them. foreach( $pages->find("tagFieldName=$tag") as $pageWithMyTag ) { // whatever you want } -
The login to add/edit the profile as well. Redirects after login attempt to https://login/ .
-
About ssl certificate and https://
wbmnfktr replied to franciccio-ITALIANO's topic in Getting Started
On Github is a .txt file, that correct. But its content should work just fine. NEVER delete a file you might need again. Especially while debugging. So as the new .htaccess doesn't as well... what were the last changes you made? Did you install or change files aside from .htaccess? Did you move folders? Did you enable anything in your hosting panel? It seems you tried to install SSL. How did you do that? Via hosting panel? Manual cert files or something similar? One change in the .htaccess can potentially break everything but it can always be reversed. -
About ssl certificate and https://
wbmnfktr replied to franciccio-ITALIANO's topic in Getting Started
Rename the old htaccess file and just add a fresh copy from the Github repository.