-
Posts
7,476 -
Joined
-
Last visited
-
Days Won
144
Everything posted by kongondo
-
I think this is the issue (HTTPS would pass through Apache port 443 as opposed to normal port 80). Could you try and disable HTTPS for admin login and see if it works? Since you cannot login, you can either do this on a fresh install or you will have to edit the home template entry in the database. Do you have access to the database? Is the frontend serving HTTPS content OK?
-
What is the exact error message? What do Apache error logs say? What is chrome/firefox showing in network tab? 403? Maybe temporarily set debug on in /site/config.php to see if you can get a better error message (I doubt though, since it seems this is stemming from a server mis-configuration and ProcessWire does not even come into play)
-
Maybe Ryan can introduce pagination in the public API ? E.g.: ../exportjson?limit=10&start=350 This is not uncommon in high-traffic public APIs.
-
Loading and saving Textarea field from/to php-file
kongondo replied to genericFJS's topic in General Support
My question was about the pictures you were talking about. Are those inline pictures as opposed to pictures (images) saved in an Image field. It is sort of a tangential question :-). -
Preview: AdminThemeUikitCustomizer
kongondo replied to bernhard's topic in Module/Plugin Development
You must have edited the wrong file then ?. That's exactly where it is. -
Loading and saving Textarea field from/to php-file
kongondo replied to genericFJS's topic in General Support
Are you talking about inline-images? -
You got a small typo:
-
Loading and saving Textarea field from/to php-file
kongondo replied to genericFJS's topic in General Support
Hey @genericFJS. Welcome to the forums. Yes. I think it is a bad idea. It seems to me that you are including PHP in your content? Any reason why you need to do this? If you wanted some logic within the text, you can use Textformatters instead (like Hanna code). -
Moving a hook function to a function called within 2 hooks
kongondo replied to a-ok's topic in API & Templates
It says it right there in the error ?, Your function shopifyInit() expects a single argument/parameter but here: you are not passing it the $event. edit: I'm too slow; what @flydev said ?. -
So you are not running ProcessWire directly then? Any reason you are bootstrapping? I'm not saying this is the cause for the slowness, just wondering. Not sure if this is still the case, but there have been reports of docker being slow on Macs, generally (as well as when tty = true. => not sure about this though). Other than that, nothing out of the ordinary jumps at me RE your Dockerfile. Let's get a few more thoughts.
-
Welcome to the community @SqANT, What's your server setup? Is it slow in the backend or in the frontend as well? I run ProcessWire in a docker machine and it runs just fine. I'm on a linux box. I use both PHP 7.x and 5.6 without issues.
-
I prefer this... +1
-
Yes, it works fine for me, thanks.
-
This sounds like a Twig issue. I've never used Twig so can't help, unfortunately.
-
Preview: AdminThemeUikitCustomizer
kongondo replied to bernhard's topic in Module/Plugin Development
This is great! I know it is a lot of work but it would be really nice to have inline comments about what areas/elements the different styles target. An accompanying cheatsheet or graphic could also do the trick. -
Robin, the CSS is not loading for me (you preview). Dev console throws an error as well about $ not defined.
-
Hi @Jonathan Lahijani, Thanks for work on this! I know your previous work and you make some great videos. I'd like to venture a few opinions if I may? For this sort of video, I think what would work best is an explainer video. Basically, a 'selling points' or 'attention grabber' sort of video. The segment should be between 40 seconds to 1 minute, tops! This is the sort of video you would make using Powtoon, Biteable or Spark. In other words, why should I use ProcessWire or what's unique about ProcessWire? This, IMHO, should be about the top-level /overarching selling points and not about the details. I think we should stick to 3, maximum 4 top selling points about ProcessWire. These can include: Easy-to-use and powerful API OR maybe consistent and powerful API? Security/Secure Custom fields Modularity Free and open source(?) > this maybe can be added as a one liner, even at the end of the video (and it's not really a unique selling point per se) An explainer video does not need to show off the full range of the power of ProcessWire. It just needs to grab the attention of the curious developer, to get a foot in the door, so to speak. Hence, the specific details, e.g. Matrix Fieldtype, procache, formbuilder, Github, etc, are for other (more) videos and are not ideal for 'an intro to ProcessWire' sort of video. In addition, ‘the going through the backend’, IMHO, should not be the focus of this video. These are for a ‘tour of the backend’ sort of video, which an explainer video, due to its length, cannot adequately cover since it will feel rushed and crammed. Ideally, the explainer video should be geared towards our target audience (which seems to be web developers), but this may be difficult to pull off. It’s best to try to fit text into one liners, rather than wrap-around texts, if possible. If the final website is going to change, and this video will show the website, you might want to hold off until then? Finally, I am not saying that it should be an animated video. I think the most important thing is that it should be simple, concise and clear but most of all, really 'sell me' to the idea of ProcessWire. Thanks.
- 290 replies
-
- 11
-
Sample code for MarkupAdminDataTable usage?
kongondo replied to Gadgetto's topic in Module/Plugin Development
Sometimes it's easier to just look at the core code examples. Admin Data Table is used, for instance, on the templates and fields listings. Other times, just look at the class itself, e.g. here for MarkupAdminDataTable Edit: oops, beaten to it by @gmclelland -
Moderator note: @pwFoo, I removed the other original/identical topic
-
I'd start by reading about $cache. Try the examples at this link that I posted above especially under Cache PageArray objects. You would want the cache refreshed every time a quote page is created/edited. Secondly, do you really need repeaters for your quotes? You could store each quote as a page under one parent. Finally, without knowing a bit more about your template and page structure, it is hard to give more specific advice.
-
If your site is not highly dynamic, then fetch all your quotes (I am assuming they are less than one hundred) once (or every now and then) and cache the results server-side. If your quotes appear on every page on your site, or most of them, you can get away with caching client-side (e.g. quotes in hidden elements) rather than making regular ajax calls. Otherwise, you'll need to fetch quotes from your cached server-side results (i.e., the quotes cached server-side) using ajax. Have a look at WireCache ($cache) and the links below. https://processwire.com/blog/posts/processwire-core-updates-2.5.28/#wirecache-upgrades
-
Convert Pages with image field to php array / json
kongondo replied to pwFoo's topic in General Support
I guess so. How many properties do you need though? The properties of images are well-known. Couldn't you just type them up in an array (name, tags, url, etc)? -
Convert Pages with image field to php array / json
kongondo replied to pwFoo's topic in General Support
You are right; It doesn't work that way. I'm not sure if that is the intended behaviour of explode() if no parameters are passed. It is returning an object; not a normal array. Btw, getValues() returns all the properties. However, this is an array of a Pageimage object. You'll still not be able to access the keys like in a normal array. -
Convert Pages with image field to php array / json
kongondo replied to pwFoo's topic in General Support
You are right. So, we convert it to a WireArray and we can use explode() ? // single image field $singleImage = $page->image; // new WireArray for convenience $wa = new WireArray(); // add our single image to the WireArray $wa->add($singleImage); // you can add all the properties you want here $arr = $wa->explode(array('name','description','url')); // normal array echo '<pre> ONE IMAGE IN WIRE ARRAY '; print_r($arr); echo '</pre>'; // normal JSON echo json_encode($arr); getArray() won't work, as you found out since it is just an array with objects in it.