-
Posts
2,228 -
Joined
-
Last visited
-
Days Won
58
Everything posted by wbmnfktr
-
There are so many ways in ProcessWire to do or save things. Depending on your background and history with ProcessWire you will find other ways or solutions. I know recipe-collectors that would only need two fields. A title and a textarea. I personally would go a more abstract way to be able to much more and other things. Template: Recipe Fields: title (text) summary/introduction (textarea) preparation (textarea) ingredients (repeater) Fields: ingredient (page reference - pages with template ingredient) amount (int or text) unit (select options - grams, cups, liters, hint) images (image) Template: Ingredient Fields: title With that setup I can easily collect all my recipes, create a list of all ingredients I need for all of my recipes. Can look for recipes with a special ingredient and so on.
-
I face a problem with dependencies right now. A field should only be shown and be mandatory if a checkmark (within the repeater matrix type section) is set but this doesn't work all the time. Right now I disabled this dependency and focused on other things but yes... it still seems to be a little bit... unstable.
-
Are ready.php hooks/addHookMethods called outside their use?
wbmnfktr replied to a-ok's topic in General Support
Ok... sorry... I guess I wasn't accurate enough. In my understanding the hook is fine. As it is ready to get called whenever the API is ready - which is almost every time in your case. No matter if front-end or admin back-end. That's totally fine. But your function won't be executed until !$session->get("shopifyShopCurrency"). Which is fine too and the exact thing you wanted. So... yes... it's bizarre that you already reached your limits. Maybe. I don't know the API limits or the traffic your site gets. Maybe there are lots and lots of bots/spiders on your site that trigger your hook. Or there is enough regular traffic and you need more API requests. Can you log each request/function call to count how often it's executed? -
Is hosting provided by 1&1 as well? If so... you could ask their support if you have to use another server/port or whatever in that case. Have you tried another mail service like Gmail? Does that work? If so... 1&1 might have the right answer. if not... there is another problem. What's the complete error message WireMailSmtp shows?
-
Are ready.php hooks/addHookMethods called outside their use?
wbmnfktr replied to a-ok's topic in General Support
Source: https://processwire.com/blog/posts/processwire-2.6.7-core-updates-and-more/ So... in your case it seems as it's called and used almost every time a page loads/renders. -
There have been several threads regarding rewriting page URLs but most of them went towards different directions. You could probably hook into several things and rewrite URLs. I don't have a proper solution for this right now but I'm quite curious about the WHY. Why do you want a URL structure like that? It feels kind of outdated or Contao-like nowadays. If it's because of OLD vs. NEW setup and URLs you could go different ways and redirect the old structure to the new structure.
-
Regarding symlinks... you should check that htaccess and mod_rewrite play nice together. 1. htaccess # ----------------------------------------------------------------------------------------------- # 1. Don't show directory indexes, but do follow symbolic links # 500 NOTE: Some cloud hosting companies don't allow +FollowSymLinks. # Uncomment +SymLinksifOwnerMatch and comment +FollowSymLinks if you have 500 errors. # If that doesn't resolve the error, then set it back to +FollowSymLinks. # ----------------------------------------------------------------------------------------------- Options -Indexes Options +FollowSymLinks # Options +SymLinksifOwnerMatch 2. Apache / mod_rewrite conf In some cases each document root needs individual configuration settings. Especially in vServer/root server environments.
-
It's more about server/hosting security than validation as it happens server-side and before any request reaches ProcessWire. ProcessWire works out of the box in about 95-99% situations already. Maybe not in case of NGINX but that's another thing. Knowing more about systems and their configuration isn't a bad thing at all. I don't want to miss anything I know about servers and how to handle them. Have you ever installed Typo3? It is (or at least was) pain in the a** and they still have a nice market share. I'm more afraid of doing my taxes and still I have to deal with it. There are professionals for those things. I wouldn't spend too much time and effort in replacing some lines in the .htaccess file. Why bother with something that's already working almost all of the time? Debugging those installation or migration issues within the core of a CMS is way more difficult than (un-)commenting some lines in a plain-text file. And to be honest... I'm quite shocked that WordPress has just a few lines in its .htaccess. Last but not least... In my opinion: No... I think the .htaccess could do even more in some cases. For example: https://processwire.com/blog/posts/optimizing-404s-in-processwire/
-
Some fresh sounds I discovered recently. I didn't know I'd like this Synthwave music but... can't get anything done without it. Whole YT Channel: https://www.youtube.com/channel/UCmYTgpKxd-QOJCPDrmaXuqQ Some more on Basecamp. If you loved Stranger Things (Netflix) you will probably like this too. https://synthwavecafe.bandcamp.com/album/stranger-things-tribute
-
Maybe this could help... if it's the same error/behaviour:
-
It's just a default Mailchimp newsletter template shown in an online archive. ?
-
I guess it's something totally obvious but right now I'm out off new ideas. Sorry.
- 10 replies
-
- inputfield
- asmselect
-
(and 2 more)
Tagged with:
-
no site configuration or install.php available
wbmnfktr replied to DevCat's topic in General Support
Ok... try to uncomment line 116 in the .htaccess # RewriteBase / How does your mod_rewrite settings for that directory look like? I might need AllowOverride All. -
Ok... just some other thoughts. Is that page field setup correctly? Are the pages you want to add matching the parent/template settings within the page field? Are those pages you want to add hidden or unpublished? Does your query find those pages?
- 10 replies
-
- inputfield
- asmselect
-
(and 2 more)
Tagged with:
-
I meant the install.sql file within /site-profile-name/install/. But as the blank profile doesn't work either you want to try this... In /install.php you will find const TEST_MODE = false; (around line 55) - change this to true and try again. It will not install anything but tell you possible problems while it tries to do all the install-magic. Another thing could be the whole setup. Which ProcessWire (2.7?), PHP and MySQL version do you use? Maybe there is something... odd.
- 7 replies
-
- processwire
- local webserver
-
(and 3 more)
Tagged with:
-
And another thing with repeaters via API. At least I save after each new repeater - as seen below. $trialsPage = wire("pages")->get(28422); // Get the page $trialsPage->of(false); $newTrial = $ordersPage->trial_repeater_orders->getNewItem(); // Add item to repeater foreach ($selectedProducts as $selectedProduct){ $productPage = $pages->get("template=product, reference={$selectedProduct}"); $newTrial->trial_selected_products->add($productPage); $newTrial->save(); } $trialsPage->save();
- 10 replies
-
- inputfield
- asmselect
-
(and 2 more)
Tagged with:
-
Does it work with $selectedProduct in curly brackets like this {$selectedProduct}? $trialsPage = wire("pages")->get(28422); // Get the page $trialsPage->of(false); $newTrial = $ordersPage->trial_repeater_orders->getNewItem(); // Add item to repeater foreach ($selectedProducts as $selectedProduct){ $productPage = $pages->get("template=product, reference={$selectedProduct}"); $newTrial->trial_selected_products->add($productPage); } $newTrial->save(); $trialsPage->save();
- 10 replies
-
- inputfield
- asmselect
-
(and 2 more)
Tagged with:
-
no site configuration or install.php available
wbmnfktr replied to DevCat's topic in General Support
Narrow it down to possible problems in your setup. Is it the right folder? Can you access a test.html in that directory from your browser? Does mod_rewrite work properly for that folder? Have you setup a virtual host for it? -
Check the .sql file that's in your PW site profile. There might be date ranges similar to 0000-00-00 00:00. Change them to something like 2019-01-01 11:22. Then go to your phpMyAdmin or whatever tool you use in your setup and delete everything in your database. Either import the .sql file manually or try another clean install. I have had that issue before with several profiles created with the Site Profile Export module I wanted to set up locally (within Laragon). Maybe that's similar to your case and setup even though you are using MAMP.
- 7 replies
-
- 2
-
-
- processwire
- local webserver
-
(and 3 more)
Tagged with:
-
How to get the Requested Page URL that ended in a 404?
wbmnfktr replied to wbmnfktr's topic in General Support
Wow... thanks @adrian. This didn't show up on my radar but it's a big step forward and probably already the solution. I will definitely try this. The amount of 404 errors in this case is actually quite low (~100/month) and will not end in a performance issue. But you are correct. This could become an issue especially in the first time after moving a WP site over to ProcessWire. The optimization guide is great and I already had to dig into it once. -
Ok... I need your help and guidance with this. As the title says: How to get the Requested Page URL that ended in a 404? I'm looking for a ProcessWire-way of getting the originally requested URL that ended in a 404. Right now on a 404 page a $page->url will show /http404/ no matter what URL was requested. The parent is always id=1. There aren't any siblings or children. Technically that's totally fine and correct. But I'm kind of in need for something like $page->requestedUrl or $page->getForPage()->requestedUrl. Is there a hidden gem somewhere in the docs or a neat little trick for that? Why I'd like to have this? Because I'd like to check if there are any pages, in the same page tree or within the same topic or whatever similar to the requested one. Most 404 pages are kind of boring and in most cases there are no real benefits. I could just add some random blog posts if it's a blog or offer a search form but that's not the real deal. On a real estate site I'd like to show similar properties/houses/condos/whatever. On a recipe site similar recipes. And so on...
-
@MrSnoozles You could use this one: https://processwire.com/api/ref/sanitizer/page-name-translate/ Define Umlaut-Translations (ä = ae, ö = oe, ü = ue) here and it's done: uehttp://domain.tld/processwire.admin/module/edit?name=InputfieldPageName&collapse_info=1 I drink Jägerbombs would result in i-drink-jaegerbombs. Or do I get you wrong on this?
-
Ok... my mind seems more reliable than I thought. ? I wish I could find that thread or post where it was discussed back than.
- 12 replies
-
- 1
-
-
- progressive
- interlaced
-
(and 4 more)
Tagged with:
-
I guess I'm totally wrong with that but somehow my mind tells me that you will need ImageMagick/IMagick support for this.
- 12 replies
-
- 1
-
-
- progressive
- interlaced
-
(and 4 more)
Tagged with:
-
Four sites, all bilingual with different domain for each language
wbmnfktr replied to Guy Verville's topic in General Support
??? The more often you write it, the easier it gets. ?