Jump to content

hettiger

Members
  • Posts

    39
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by hettiger

  1. For anyone who might be wondering. I'm about to talk with zynth about Larawire's future and I might start to work on it again. Maybe there are other community members that want to join the party …?
  2. @Wanze Would it be possible to support: $config->pagefileSecure = true; If it is already supported? What am I supposed to do? I'm getting "missing image" icons only: If i disable `$config->pagefileSecure` everything's working fine and I see the images in the PDF. Warning: Don't try to use image resizing and dynamically disable `$config->pagefileSecure` while rendering PDF's. It will create the image variations in an unprotected directory. Quick Workaround: $filePath = $image->size(0, 100)->filename; $fileType = mime_content_type($filePath); $fileContents = file_get_contents($filePath); $base64 = base64_encode($fileContents); $out[] = "<img src=\"data:image/{$fileType};base64,{$base64}\">";
  3. That's really weird. Please make sure to keep us updated if you or your hosting company finds a solution so others can find help here.
  4. Can you reproduce this behavior using a clean install of ProcessWire? I've had no issues running PW3 on PHP 7 so far. It's running like a champ and much faster on 7 thought
  5. Well the pricing depends on the setup (cloud / self-hosted) and the number of users. It could be the case that the feature is already included in the current plan. (cloud) If not we're looking at a one time payment of 100$ + 70$ / year. (Self hosted) Maybe it's not worth it right now but I'm pretty sure it would be in the future, when more premium modules arrive. (The fact that there aren't too many available right now is another sign that we need a strong, open and official marketplace thought) And who knows: Maybe Ryan even has a special sponsorship deal or something like that with them and it would be for free ...
  6. Of course you are right @szabesz. I can understand why we don't have it yet. I just wanted Ryan to really consider it and to know that there are people that would be happy to support him with a referral fee or something. That's the point I'm not quite sure about. Have a look at https://invisioncommunity.com/features/commerce#elCommerce_marketplaceContainer (This is a feature of the forum software processwire.com/talk/ is using) The board works great so I guess the feature might do what it's supposed to do out of the box quite well?
  7. Yes it is indeed an option and nice to have but i would vote for opening the official store for 3rd party module developers. Please consider this @ryan It would motivate more professionals to develop amazing modules for ProcessWire. For newcomers it would be easier to actually find the plugins they need. I usually prefer paid modules because I feel more safe when it comes to support / updates. (But currently I'm forced to use some weird unofficial selfmade stores which is not supporting the feeling of safety and trust that I'm looking for as a customer) Support requests for these modules could go into their dedicated VIP Support Forums just like with Ryan's Pro Modules. (The whole community could benefit from already answered questions easily ...) I could keep going on but I'm sure it is not even necessary. Everyone can make up their own mind on this topic for sure. Just one more thing I want to add: I much prefer to support Ryan with a referral fee for each sold item instead of anyone else.
  8. I'm using something like this: <div edit='1.title' onclick='this.dispatchEvent((new MouseEvent("dblclick", { view: window, bubbles: true, cancelable: true })));'> <i class="fa fa-cog fa-fw" aria-hidden="true"></i> </div> Working pretty fine for me.
  9. Just wanted to note that there seems to be a typo. $(document).on('pw-reloaded', '.pw-edit-modal', function() { console.log("reloaded"); }); This will work just fine and is probably the better approach than going with "pw-modal-closed"
  10. I just wanted to say THANK YOU @adrian Great work!
  11. Thank you Michael, that's exactly what I was looking for. My module is already creating it's fields / templates etc. itself during install using the existing ProcessWire API which works amazingly. I should be up and running pretty quickly ?
  12. Thank you @LostKobrakai for sure I'll have a look at these! Do you consider your Migrations module somewhat stable yet? (Even thought there's still the beta flag) I've already had a look at it the day you published it but didn't consider it for actual real world projects yet because it was brand new
  13. I'm using GitLab CI for continuous integration right now. Other people might use something like Travis CI. For the frontend part things are pretty easy: image: node:6.10.3 cache: paths: - node_modules/ build: script: - npm install - node_modules/.bin/gulp build Now I could extend my setup to run tests or whatever I want. It just works. In this post I'm not interested into finding out how I could go about testing and stuff. I just want to know how I could accomplish the equivalent to the above setup task for ProcessWire. It doesn't seem to be too easy to me since the installation process is running in the browser asking you a lot of stuff. How could I go about it using the CLI? That's what I currently have: git clone git@github.com:processwire/processwire.git cd processwire mv site-blank site rm .gitignore git submodule add -b develop git@gitlab.local:path/to/MyModule.git site/modules/MyModule From here on I'm stuck. The only possible solution I see is maintaining a super repository including a database dump that has it's module dependencies defined in a .gitmodules file. This could then be installed using: git clone --recursive git@... Once that's completed all that needs to be done would be to create the database using the dump. Probably that's a pretty solid solution but it adds the overhead of having to maintain an additional repository + database dump. I'm trying to find an alternative that's using the original processwire repository. That way I could just rerun my build once a new version get's merged into master and see if everything would be still working as well. I'm looking forward to your replies. Thanks!
  14. Thank you guys for the additional information. What I ended up is posting data like this: private drop(event: DragEvent): void { let payload = JSON.parse(event.dataTransfer.getData("application/json")); let widget = this.$root as any; let data = new URLSearchParams(); // ProcessWire CSRF protection does not recognize JSON data per default data.append(widget.tokenName, widget.tokenValue); data.append('foo', payload.foo); fetch("/admin/page/foo/bar/", { headers: { "Content-Type": "application/x-www-form-urlencoded; charset=utf-8", "X-Requested-With": "XMLHttpRequest" // Required for ProcessWire to identify as ajax request }, method: "post", credentials: "same-origin", body: data }) .then(response => response.text()) .then(text => console.log(text)) .catch(error => console.error(error)); } This request is perfectly recognized by ProcessWire the way you would expect and CSRF protection is working. It shouldn't be tedious to make use of security critical features like CSRF protection. I love ProcessWire because it saves me huge amounts of time. If I have to mess around with something to make it work that costs me time. It doesn't matter if you consider it to be an easy task or if it's the developer's responsibility. It takes time and there's room for improvements. I'm just giving feedback. Take it or leave it.
  15. Is there really no solution to this issue? It's a huge drawback thought :-/
  16. hettiger

    Fotomediale

    @AndZyk The websites I've seen from you all were surprising to me. (In a good sense) Keep up the good work!
  17. Today I want to tell you about my most recent Project: Cooking-Couple.de Maybe you've already seen it. I've got it listed in the ProcessWire Sites section for quite some time now. Also it has been mentioned by ProcessWire Weekly as the Site of the week: ProcessWire Sites Section: https://processwire.com/about/sites/list/cooking-couple/ ProcessWire Weekly: https://weekly.pw/issue/137/ What is this website all about? Why did I make it? I'm using ProcessWire at my day-to-day job and this project is my private playground for learning. Besides of that of course it's actually really what it claims to be. We seriously love cooking and I hope we'll find the time to get enough content together so that all the powerful search capabilities make sense after all. Technical depth @teppo has already provided a great technical overview to the project. In this thread I want to give you the opportunity for digging even deeper. Want to know how I've implemented a specific feature on the site? No problem, I'll try my best giving you detailed answers about it so that you can build something similar. What happened since the review on ProcessWire Weekly got published? I updated Vue from 1.x to 2.x The faceted search has become even more intelligent and easy to use. (Especially on mobile devices) I've added suggestions on the detail page that respect content types and tags to show actually really relevant content instead of just showing some random pages. The website is no longer using the built in template cache. I've switched completely to ProCache. (Since template cache was already carefully implemented the whole switch was a breeze and the site is now blazingly fast) All the assets are now being served by a CDN (thanks again to ProCache) Several minor CSS improvements Now that I've made these updates I think the website is actually a very good showcase for the power of ProcessWire. Just have a look at the source code of some of the pages and you can see what is actually being cached. (<body ... class='ProCache'>) This alone is a huge proof of the scalability of this system. Almost every single page is being cached with static files thanks URL segments caching. Yes I'm really excited about ProcessWire and it's optimization opportunities. Roadmap Most of the features I've initially planned for this project are already implemented. Anyways there are some more ideas I find quite interesting: Adding some more filters (time, difficulties) Negating specific search filters (show recipes without specific ingredients) Rating recipes iOS and Android apps that are reading the data from ProcessWire I'm not exactly sure which of these I'll implement or if other ideas will come to my mind that I like even more. Maybe you also got some input for me? When it comes to the apps I'm actually pretty excited about that idea. I've even started building a simple API: https://www.cooking-couple.de/api/v1/recipes/ (Yes that's cached with ProCache as well ) Anyways I might wait until we get the Front-end JS $pages API mentioned at: http://processwire.com/blog/posts/roadmap-2017/ Conclusion So I guess you get the idea. I'm really excited about ProcessWire and am willing to share the knowledge I've obtained while building this website. I'm looking forward to your questions, feedback and / or input. Have a great time and thanks for being part of the community!
  18. Have a look at: https://processwire.com/docs/tutorials/troubleshooting-guide/ The .htaccess file has lots of helpful comments in it. I'm pretty sure you'll get that fixed very quickly.
  19. Just in case someone's looking for an example to get all tags that are referenced by pages of specific template types, ordered by count, limited to 10: if ( ! $config->ajax) throw new Wire404Exception(); $input->whitelist('query', $sanitizer->selectorValue(urldecode($input->get('query')))); $query = $input->whitelist('query'); $typeTemplateIds = join(', ', $templates->find('name=templateNameA|templateNameB')->getKeys()); $proposalTable = $fields->get('tagsPageReferenceFieldName')->getTable(); $titleTable = $fields->get('title')->getTable(); $sql = <<<SQL SELECT proposals.name, {$titleTable}.data as title FROM pages INNER JOIN {$proposalTable} ON pages.id = {$proposalTable}.pages_id INNER JOIN pages as proposals ON {$proposalTable}.data = proposals.id INNER JOIN {$titleTable} ON proposals.id = {$titleTable}.pages_id WHERE pages.templates_id IN ({$typeTemplateIds}) AND {$titleTable}.data LIKE :query GROUP BY {$proposalTable}.data ORDER BY count({$proposalTable}.data) DESC LIMIT 0, 10; SQL; $statement = $database->prepare($sql); $statement->bindValue(':query', '%' . $query . '%', PDO::PARAM_STR); $statement->execute(); $proposals = $statement->fetchAll(PDO::FETCH_ASSOC); header('Content-Type: application/json; charset=utf-8'); echo json_encode($proposals); Enjoy
  20. Thank you SteveB, unfortunately that doesn't work for me. I've also tryed: wire()->fuel('session')->set('PageRenderNoCachePage', $page->id); It will disable the cache, yes. But it will still cache the current request. I want to be able to prevent caching the current request within template scope. Any future requests may not be influenced.
  21. Hey there, I need to temporarily disable the template cache within template context. Since throwing a Wire404Exception effectively holds up the template cache I think it should be possible somehow. Anyways no luck so far ... I basically wan't to handle all kinds of errors myself and return a error message as json within the catch blocks of try & catch. If i just throw the Wire404Exception I'll get html with a json header. (Template is set to return json because otherwise I can't define the header when using template cache) Just throwing a Wire404Exception all the time is no real solution thought. It's dirty and not every error is a 404. Thank you for your help in advance
  22. That's brilliant teppo, thank you. The new regex: ^categories/[\w-]+$ So only a recipe with the name categories could get me into trouble. But that's no big deal.
  23. Thank you teppo, URL Segments would be perfectly fine to me. But it breaks once a recipe has the same name as a category. I know it's unlikely in this particular use case but that's just an example and content managers don't care what you explain to them :-/ I hope there is some easier way to solve this problem. Anyways, I'll try going the URL Segments route using a regex: ^category-[\w-]+$ Seems the best solution to me right now. If anyone's got a better one please let me know
  24. Hello there I'll start right away: Let's imagine we have a index page: example.com/recipes This index page is also a faceted search accepting GET params for search query, categories, tags, ingredients, ... It would be amazing to be able caching this index page to a certain degree. For example: The GET param categories is somewhat limited. There are only 5 categories in total so it would not add too much overhead. If I could add this GET param to a whitelist and set the total allowed GET params to 1 for example, this would make a great difference in performance. (If we consider there are main navigation links pointing to the faceted search with one category preselected) This would result in cache entries for: example.com/recipes/ example.com/recipes/?categories=cooking example.com/recipes/?categories=bbq While requests like: example.com/recipes/?query=foo example.com/recipes/?categories=cooking&ingredients=cheese ... would not overwork our cache Is this already possible with core modules? (MarkupCache is not really the answer I'm looking for) Is it possible with Pro Cache? Of course since it's an index page: We have pagination to consider as well...
  25. It's about convenience. I guess there won't be any other benefits. Maybe drawbacks. (Performance, ...)
×
×
  • Create New...