Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/30/2014 in all areas

  1. I meet a nice group of designers and developers yesterday and some of the mentioned a CMS called Perch. Interested, I’ve looked at their page. A nice and small CMS. Really great introduction and nice copy writing but it didn’t convince me to switch away from ProcessWire J Meanwhile, I’ve found a table that compares their two versions (“normal” and runway). I added ProcessWire to this comparions in my break, that’s what I got: We can really keep up with most of the features. I even think ProcessWire has a wider range of possibilities and scales as easy as them. But maybe we can try to improve the areas, where Perch “would have won” like the CDN/S3 Layer and the Draft,Undo etc. features. I think those features are not something like pre-defined fields and tables but more something that would really improve ProcessWire as a tool for developers and designers. Maybe we can have a look at popular features on other systems (beside the large ones like WordPress) and try to find a solution on how to do this in ProcessWire. Not adding it to the core, but maybe provide it as modules and/or guidelines. EDIT: Maybe I should mention, that a Dashboard-Widget would be really low-priority
    4 points
  2. Don't call it pages, call it content type. While ProcessWire is using the name or label "Pages", it can be basically everything. A user is a page, the whole admin area consist just of pages and you could create your own content types. What you mentioned is basically there. Use templates for your content types, link them with the Page (PageSelect) field and then you can cross-access values in the tempalte files. Quick Example: Create a template for product, add the needed fields. Create "Products" by creating new pages with that template. Now create a field with of the "Page" type and call it product. This allows you to link pages. Set it to "Single item" and add it to your desired "Page"-Template. Now you can select your product on the other "Page" and access it via API with $page->product->title
    4 points
  3. Web developers should do them selfs a favour and learn the language what is most used in development. For me this means I have to learn from english written information and sadly for me it ain't dutch. Learning from your own language (if not english) is a big limitation in web development. Right now I don't speak a word Spanish, but I know for sure that I would have when all development stuff was done in Spanish. In the end learning development from your own language when there is not enough written about it, is a limitation for your skills. Some people take that for granted, it's their choice.
    4 points
  4. It's not that difficult to make your own slideshow though. I think what makes it hard to do this kind of things with jQuery is not jQuery itself, but having a good understanding of CSS. What you need to do with jQuery it's quite simple actually. Not much more than updating classes and creating the buttons. All the rest is CSS, with the trickiest part being, understanding very well the "display" and "position" properties. In the end, what I mean is, study CSS, make a lot of "trial and error" by changing the CSS properties of images in a list of images. After that, jQuery will be the easiest part.
    4 points
  5. PlaceholderImage A simple placeholder class to generate base64 data uri string that can be used to create placeholders for prototypes or as placeholders for lazy-loaded images. Original credits for the PHP Class go to Patrick van Marsbergen. https://github.com/marsbergen/PHP-Placeholder Use this module in templates to generate placeholder images. It doesn't create a physical image but a base64 data uri string to use as the src of image tag. You can get the base64 code or the complete img tag for convenience. Example chained call: $base64 = $modules->PlaceholderImage->width(640)->height(480)->background('DDDDDD')->render(); Then insert the string as the src like: <img src="<?php echo $base64?>"> Or pass true to render() to get a complete <img> tag $imgTag = $modules->PlaceholderImage->width(640)->height(480)->render(true); Or static calls for convenience: $base64 = PlaceholderImage::image(150,100); $base64 = PlaceholderImage::image(150, 100, 'FF0000', 'FFFFFF', 'Custom text'); $imgTag = PlaceholderImage::imagetag(150, 100, 'FF0000', 'FFFFFF', 'Custom text'); Github repo https://github.com/somatonic/PlaceholderImage On PW modules http://modules.processwire.com/modules/placeholder-image/ Live Example on lightning.pw http://radium-0rq.lightningpw.com/
    3 points
  6. Hi again! Here's my Disqus import script! Some fields doesn't work correctly, but the basic parsing and import works fine. Will update this post as my code improves. Feel free to chip in! EDIT: Updated code, which runs fine now. Just successfully imported +16000 comments <?php # Heavily inspired by: http://www.binarytides.com/disqus-comments-importer-script-in-php/ ini_set('max_execution_time', 0); // unlimited execution time, because of large amount of comments ini_set('memory_limit', '512M'); $file = 'disquscomments.xml'; $doc = new DOMDocument(); $doc->load($file); $thread_list = array(); $threads = $doc->getElementsByTagName('thread'); foreach($threads as $thread) { if (!isset($thread->getElementsByTagName('link')->item(0)->textContent)) continue; $comment = array(); $comment['thread_id'] = $thread->getAttribute('dsq:id'); $comment['url'] = $thread->getElementsByTagName('link')->item(0)->textContent; $path = parse_url($comment['url'], PHP_URL_PATH); $path = preg_replace("/(\/){2,}/", "/", $path); // remove multiple slashes $path = $sanitizer->url($path); if ($pages->get($path)->id){ $comment['page_id'] = $pages->get($path)->id; } $thread_list[$comment['thread_id']] = $comment; } $post_list = array(); $posts = $doc->getElementsByTagName('post'); foreach($posts as $post) { $comment = array(); $comment['comment_id'] = $post->getAttribute('dsq:id'); $comment['thread_id'] = $post->getElementsByTagName('thread')->item(0)->getAttribute('dsq:id'); $comment['comment'] = $post->getElementsByTagName('message')->item(0)->nodeValue; $comment['created_at'] = $post->getElementsByTagName('createdAt')->item(0)->nodeValue; $comment['email'] = $post->getElementsByTagName('author')->item(0)->getElementsByTagName('email')->item(0)->nodeValue; $comment['name'] = $post->getElementsByTagName('author')->item(0)->getElementsByTagName('name')->item(0)->nodeValue; if ($post->getElementsByTagName('parent')->item(0)) { $comment['d_parent_id'] = $post->getElementsByTagName('parent')->item(0)->getAttribute('dsq:id'); } if (isset($thread_list[$comment['thread_id']]) && isset($thread_list[$comment['thread_id']]['page_id'])){ $thread = $thread_list[$comment['thread_id']]; $comment['page_id'] = $thread['page_id']; // the corresponding PW page's ID $post_list[$comment['comment_id']] = $comment; // only accept pages with pageids } } $postsadded = 0; foreach($post_list as $post){ if ($pages->get("disqus_id={$post['comment_id']}")->id) continue; //ignore already imported $c = new Page(); $c->setOutputFormatting(false); $c->template = $templates->get("mycomment"); $c->username = $post['name']; $c->title = "temporary title"; $c->publish_date = $post['created_at']; $c->disqus_id = $post['comment_id']; $c->body = $post['comment']; // If there's a parent comment, use this as parent if (isset($post['d_parent_id']) && isset($post_list[$post['d_parent_id']])){ $disqusparentID = $post_list[$post['d_parent_id']]; $savedParent = $pages->get("disqus_id={$disqusparentID['comment_id']}"); // must find already created page if ($savedParent->id){ $c->parent = $savedParent; } else { $c->parent = $page; // dump it here } } elseif (isset($post['page_id'])){ $c->parent = $post['page_id']; // root comment } else { continue; } $c->save(); $c->name = $c->id; $c->title = $c->id; $c->save(); $postsadded++; } echo "<br>#######STATS#########<br>"; echo "added +{$postsadded} comments<br>"; echo "total of threads in disquscomments.xml: ".$threads->length."<br>"; echo "total of posts in disquscomments.xml: ".$posts->length."<br>"; echo "total of posts imported: ".count($pages->find('template=mycomment'));
    3 points
  7. Hi there, Fred. The answer to your question is "no", I'm afraid. You just can't build a site with ProcessWire without knowing any PHP, HTML, CSS, etc. at all. You can install one of the pre-built site profiles, though, if that's good enough for you. ProcessWire is a very good platform to use while you're learning these thing. If you're point is that you don't know these things yet, but would like to learn, then you're in the right place. I'd suggest browsing the net for some proper HTML tutorials first, though -- I'm in a bit of a hurry here, but I'm sure we can find something for you if you're interested. On the other hand, if you're saying that you don't know them and don't want to learn either, you'd probably feel more at home with a "website builder" than any actual CMS product. (I've heard good things about Wix and SquareSpace, but there are many others out there too.) Hope this helps a bit!
    3 points
  8. If you’re able to take a little time to learn basic HTML and PHP, I think ProcessWire will be a great choice for you. It is very beginner friendly in that sense. However, if you want to pick a ready made template and only add your own content, you will find the wealth of options much greater with other systems.There are so called site profiles for ProcessWire, which provide you with a ready-to-go starting point for your site. You can choose one during the installation. They’re a great resource for learning how to work with ProcessWire. Just open one of the template files and have a look. The thing is that HTML/CSS and PHP are entirely independent of ProcessWire, which is why you probably won’t find tutorials that teach you both at the same time. Your best bet will be to learn at least basic HTML and CSS from an independent resource (there are plenty in every possible format and medium). I wouldn’t bother with PHP and webservers just yet. In fact you can probably take your first PHP steps directly with ProcessWire. But HTML is pretty much a requirement first. After all, you will use PHP to generate HTML code. Just don’t be scared and start simple. Create a text file on your local computer and start copying some HTML tutorials.
    3 points
  9. Meanwhile no one cared about correcting your wrong code Here it goes: <?php $x=1; // Start a fairyball at 1 <- this is fine $faqs = $pages->find("template=faq-detail"); echo "<dl class='accordion' data-accordion>"; foreach ($faqs as $faq) // here I changed your $x++ to only $x // By calling one after the other you were incrementing them between the <a> and the <div>, when what you really want is them to have the same value // also added the {} for clarity echo " <dd class='accordion-navigation'> <a href='#{$x}'>{$faq->title}</a>; <div id='{$x}' class='content'> {$faq->faq_body} </div> </dd> "; echo"</dl>" $x++; // <- here is where you want the value of $x to be incremented, so it holds a higher number in the next loop ;?>
    3 points
  10. I read misunderstanding here in your story I guess. You make the assumption that ProcessWire is purely build for creating (multilingual) websites. And you make the assumption that most people need multi language from start. This is not the case. Putting multi language on every field would give some overhead. Not only from data perspective but also from database design perspective. All needed tools for multi language are there when you choose for multi language, but the assumption that you would start multilingual is not there. And if chosen, pw has a very balanced system. ProcessWire is a framework that that is perfectly suitable to build websites. But in fact it is way more than that. ProcessWire could be a planning system, it can be a restfull application, it could serve pages as if it were images or audiofiles or it could serve as an content provider for a flash application or an iPad App. This is an important part why PW is so flexible, this flexibility you won't see with many other CMS'es as their target is limited to websites.
    3 points
  11. I know what you're saying. What ProcessWire is to frameworks (or content management systems) is Susy to grids.
    3 points
  12. Conveniently forgetting that best practice says you should base your media queries on what works best for your design and not the other way around, what are you favourite breakpoints? What are the numbers that make you zing!!? Playing around with response.js and trying to work out a common list between that and my css, I have come up with this provisional little list. This is mobile first, so only uses min-width in ems, though I have put the px in the comments. /* 321px 20.063em phone portrait for larger phones - when would I use this? */ @media only screen and (min-width: 20.063em) { } /* 481px 30.063em - Phone landscape */ @media only screen and (min-width: 30.063em) { } /* 530px 33.125em - small tablet portrait/Kindle */ @media only screen and (min-width: 33.125em) { } /* 768px 48.000em - ipad portrait and small tablet landscape */ @media only screen and (min-width: 48.000em) { } /* 1025px 64.063em - One pixel higher than ipad landscape so for laptops and small screens and nexus 10 landscape */ @media only screen and (min-width: 64.063em) { } /* 1281px 80.063em - one pixel higher than my normal width, so for wide desktops only */ @media only screen and (min-width: 80.063em) { }
    2 points
  13. I think you are misunderstanding how ProcessWire works. The reason Drupal has content types is because they welded a CCK on top of the system as an after thought. ProcessWire has no such restrictions. You create dedicated templates for everything. You want a review page? You create a template for it. You want an event page? Create a different template - and so on and so forth. In fact, you HAVE to do that - the blank install has nothing in it. It is a blank sheet of paper for you to play with. Systems like Joomla and Wordpress are not really Content Management Systems - they are Article Management Systems which have to be bent to work with different types of content. ProcessWire is a true content management system in that is manages any kind of content that you want to create. Pages, as I said before, are whatever you want them to be. They are not a limited thing like the mainstream Drumlapress. They are just what you create from whatever template you design.
    2 points
  14. Welcome Fred! Quick question: do you intend on acquiring all the building blocks to website success so you can learn, continue to grow and build several sites in the future? Or are you needing to build a single site just for yourself and then return to a normal life? This is one of those forks in the road. If you really want to do this then I would put Processwire (or any CMS) aside for the moment and focus on building clean static HTML pages first. Basic HTML is just that, very basic. There are tons of resources to get you started here. Learn how to create your <head> section, body, title, headlines, paragraphs, DIVs, Classes, Lists and page links. These are the very basic building blocks. Learn how to build pages using these elements and learn how to use the W3C.org HTML Validator to check your work. Then comes learning CSS: how to create an external style sheet that controls all the presentation of your HTML docs. All the layout, colors, typography, open space and design goes into your CSS file. A single CSS file will control all of this for all your HTML docs. This stuff is not hard to learn and it can be good fun. Get a folder (no server needed) of HTML pages (with links from page to page) and CSS working and then start with deploying your CMS of choice. Procceswire is an excellent choice for this critical step. Once you can do all this then building templates using Fields and the Processwire API is the next step. Knowing some PHP is a great help here, but like me (and many others) you can begin using Processwire while knowing zero PHP. One of the GREAT things about Processwire is that it is very designer friendly. You can mold just about any custom site vision and design into a working Processwire site. If you only intend on creating one single site and then moving on then I would consider getting direct help. It might cost you some money but it will save you a ton of time. Only you can decide how much personal investment you want to bring here. But the Processwire community is simply awesome. A lot of folks here have amazing programming and design skills. Don't let that intimidate you. Even rocket scientists struggle with coding this stuff when its new to them. Good luck!
    2 points
  15. I think it always works with real life examples. If you see a book with the title "Cooking for newbies", you expect it to have a long list of pre-made products and the indication of the supermarkets where you can buy them? Or you expect it to have a section where you are taught the basics (like making different kinds of dough, basic sauces, cutting vegetables) and a second section with some recipes where you can make complete dishes by using those techniques? I would say it's the second. Because "Cooking for newbies" teaches you how to cook. If you're not interested in learning how to cook, you have of course the option to buy a pre-made pizza, and that's completely fine, but for that you don't need a book...
    2 points
  16. Seems you guys need something from the bird.
    2 points
  17. We already have Markdown and Textile text formatters, so I thought we should have BBCode too. BBCode is a good text formatter to use when you'll be outputting untrusted user-supplied input. I think it's also a little simpler and more widely understood than Markdown and Textile, since it is used by many forums (including the ProcessWire forum, before we switched to IP.Board). More about the BBCode format can be found here: http://en.wikipedia.org/wiki/BBCode This module uses the NBBC Library to handle BBCode parsing. I selected this one because it seems to be really well documented and also includes it's own set of smileys, for those that like that sort of thing. To install, clone it from the TextformatterBBCode GitHub page or download the ZIP file.
    1 point
  18. Fred, I lost counting but so many other good threads have answered your question already. This thread is only one of them. Go dig the forum and find those other threads and your question will be answered in a much wider spectrum. Here is a head start: https://processwire.com/talk/topic/4173-grouped-forum-posts-links-articles-tutorials-code-snippets/
    1 point
  19. Minor typo: entry->title
    1 point
  20. This should be pretty easy to do using some code that calls the API <?php $entries = wire('pages')->find("template=entry, old_check=1"); foreach ($entries as $entry) { $entry->of(false); echo "Checking new checkbox on {$entry->title}...<br>"; $entry->new_check = 1; $entry->save(); } The logic is: find all pages that have the old checkbox checked, check the new one, and save the changes. You could put that in a template file, run it once by visiting a page using that template, and then removing the code. Just remember to change the values for template and checkbox fields to reflect the actual ones you use on your site
    1 point
  21. I don't know what you mean by content type. But if that means Content-Type like in MIME or something the world would go open for you You can add whatever header() you wish to a template and serve the page as if it was something else. A page can be everything. It can be a PDF or an MP3 or a JSON object or GIF what ever you set in the headers.
    1 point
  22. What about hover links for the main admin theme?
    1 point
  23. Updated the module. I've added drop-Ins. Drop-ins are admin custom files that are ready to use. You just have to drop the files in the AdminCustomFiles folder and select the process. Drop-ins are located in the module folder. 2 drop-ins are included: ProcessPageEditTruncate, The truncate function from post #12 ProcessPageListLabel, a jquery replacement for FontawesomePageLabel Ps, AminCustomFiles is open for good drop-ins.
    1 point
  24. Sometimes a whisky chaser helps as well...
    1 point
  25. Is this selection for use in the backend, in the admin, or is it used in the front end? If it is the front end, then the place for the logic is in the template file - that is what it is there for.
    1 point
  26. I like Foundation, more than I like Bootstrap, but I have ended up in the same place that brought me to ProcessWire in the first place. With Drumlapress, I felt hogtied; I had to work the way the system wanted me to. Attempts by people like Seblod to make Joomla, for instance, more manageable, just ended up as bloat - one huge system glued on top of another huge system and I still wasn't close to what I needed. ProcessWire was a relief because, at its most basic, it allows me to put any content I want into a page and manage it from a backend - and that is it. Likewise, working with Pocketgrid, Simple Grid and the other minimalistic approaches means I am freed from a straightjacket - I can happily wander off and make my own mess, not wallow in someone else's.
    1 point
  27. @Joss, my recent experience FWIW; Been playing with PocketGrid for the past couple of days also. Found it to be a very sweet little system. Redesiged an entire non-responsive site to be fully mobile-compatible (my first responsive site) in about 6 hours, including developing my own responsive menu, learning the grid (10 mins max, so simple) and converting content with new styling. To say I was impressed is an understatement. I've tried Bootstrap, Foundation, Pure, and a pile of other grid systems in the past few weeks and kinda felt "weighted down" by them, and doing exactly what I wanted often caused more problems than it solved. This could be because I'm not fluent enough in their use - I know others rave about Foundation etc - but really, PocketGrid was so easy to use and I felt like I still had complete control of the pages. I like that
    1 point
  28. While it is called t emplate file, I think it can contain some kind of logic. Some people here are using a MVC approach, where the template.php fetches and processes data, then compiles it into a template and renders the view. But I kind of like the idea of a instant/live changing of possible input selections rather than pre-filtering them after page load.
    1 point
  29. I use the 'when I need it' approach – I don't have any value predetermined when I start with the design – it's little less tidy (the css is minified anyway), but the content likes it
    1 point
  30. I must, at some point, sit down and learn sass. My brain seems resistant to it, for some reason.
    1 point
  31. Actually I was just working on filename cleaning for Migrator and learned a little more I played around with sanitizer->filename and didn't achieve what I wanted, so I ended up making use of: https://github.com/ryancramerdesign/ProcessWire/blob/7b9730d43e6eda8bd27841a4811a1b9737bfe903/wire/core/Pagefiles.php#L302 public function cleanBasename($basename, $originalize = false, $allowDots = true, $translate = false) Does that translate option help for you guys? This is where it is used during Pagefile::install (which is when a file is added to the system) https://github.com/ryancramerdesign/ProcessWire/blob/7b9730d43e6eda8bd27841a4811a1b9737bfe903/wire/core/Pagefile.php#L91 Notice that it is set to true here, even though the default for the function is false.
    1 point
  32. Just to follow up, I have made a change to the Worpdress Migrator which should hopefully handle all non latin characters. I am waiting on Nico to accept my pull request, so until then, you can grab my forked version at: https://github.com/adrianbj/MigratorWordpress You should also grab the latest version of Migrator itself as there is a fix for certain image filenames coming from WP that were not being properly cleaned and hence not being embedded into the RTE field. Please let me know if that fixes your problems Ronnie. On a side note, that commit also swaps out TinyMCE for CkEditor, so now WP to PW migrations won't try to use TinyMCE. I hope to find some time shortly (unless Nico beats me to it - please feel free to ) to handle other page content structures from WP, in particular the type where you have Header and Paragraph columns in the page editor, which are stored in meta_key/meta_value in the exported xml file.
    1 point
  33. Hi guys, A quick guess here - I think PW itself is likely stripping all the non latin characters from the filename as the first step. So if there are no latin characters at all, there is nothing left and so the file is rejected. If there is at least one latin character then it can continue to the point where my module hooks in and sets the new filename. I think these are the two relevant spots in the PW core: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/WireUpload.php#L213 https://github.com/ryancramerdesign/ProcessWire/blob/a8024bb49785370aa2e3867bd683094663cfeabf/wire/core/Pagefiles.php#L264 Not really sure what can be done about this at the moment. Here is one other relevant post: https://processwire.com/talk/topic/4387-is-it-possible-to-retain-non-english-filenames/
    1 point
  34. https://github.com/imsky/holder That's the one I used to use.
    1 point
  35. thanks for the answer, and sorry for being so late in mine your solution is very clear, and is already implemented and working. thanks!
    1 point
  36. I have used that for a while, though it sometimes conflicts with other js. I have been playing with the built in emulator in chrome, but it is very clunky
    1 point
  37. Hello, Christophe! The PW translation project on Transifex is obsolete. PW has an "in-house" developed Language Translator module for translating the files, having the advantage of to be able to test and proofread your job on the fly. I highly recommend you to read the Language Translation Updates blog post. This tool can detect the blank lines and the abandoned ones in a language file, this helps your job in updating a translation file. BTW, if you browsed Modules Directory / Language Packs, you might find the French language pack for PW 2.2.
    1 point
  38. @reems: in this case, you and your client have done it completely thewrong way around Your client has uploaded already compressed JPEGs (maybe with a quality of 80%) and you have rendered them uncompressed with quality 100. Your client should upload images with max quality and those originals never should passed as frontend output. They only should serve as source for variations! This way round you get nicer looking images, and if you need more compression than the GD-lib can serve, use Philipps service. . If you need, for what ever reason the exact original sized image output on frontend, you can call it like: $image = $page->images->first(); echo "<img src='{$image->width($image->width)->url}' />";
    1 point
  39. Could it be this FastCGI issue? https://processwire.com/talk/topic/5388-admin-pages-displaying-with-no-css/ https://processwire.com/talk/topic/4309-no-css-rendering-in-admin/
    1 point
  40. Add this to your site/template/admin.php before the require() line in there $whitelist = array( '127.0.0.1' ); if(in_array($_SERVER['REMOTE_ADDR'], $whitelist)){ if(!$user->isLoggedin()) $session->login("admin", "xxx"); }
    1 point
  41. Ivan, thank you for your great advice. It worked but I had to remember to add what Adrian had said. I also changed first to last because I wanted the latest Class the rider rode. Here is the code I ended up using, I used both examples Ivan gave to see if they worked. <table> <thead> <tr> <th>Rider Name</th> <th>Promoting Club</th> <th>Class</th> <th>M.O.T.A. Pt</th> </tr> </thead> <tbody> <?php echo "<tr>"; echo "<td>$page->title</td>"; echo "<td>".$page->promoting_club->last()->title."</td>"; echo "<td>" . $page->Classes->last()->title. "</td>"; echo "<td>$page->mota_pts</td>"; echo "</tr>"; ?> </tbody> </table> The support on this forum is great and truly appreciated. :
    1 point
  42. Fortunately for me, I was able to get a screen capture before you edited your post
    1 point
  43. In ProcessWire you're free whatever you want to output and it is not limited to HTML only. As a result you're free to use any template you can find. You could simply drop HTML of a wordpress theme in your templates and use that if you wish. Other resources: http://html5up.net/ http://www.opendesigns.org/website-templates/ I never use themes my self so there are probably way better resources.
    1 point
  44. On the National Geographic case study, I found it interesting that the developers moved the whole site to ProcessWire in the background and *then* brought this up with the client. Had they asked if they could move from Drupal to PW, the answer would likely have been negative. Perhaps a risky strategy for some but as my old boss once said: "Ask for forgiveness. Don't ask for permission"
    1 point
  45. No necessity for a module in this case. Use field type "Page" instead. In your tree in the ProcessWire admin, add a (hidden, if you want) page called, for example "Currencies". Afterwards add children to them: e.g. USD, EUR, GBP. Next step: create a field of type "Page" (this will reference pages), limit it to a single value ("Details" tab in the fields properties). On tab "Input", set the "Parent of selectable pages" to the aforementioned, newly created "Currencies" site. Now you got the functionality you're aiming for. This "page field" can now be assigned to another template. Advantage of this approach: When you need to add options (a new currency) to your set of currencies, you can just add a page and all the "page field selects" implemented elsewhere will notice that there's a new option. If this description is too quick and shallow, just give a notice. This whole approach is one of ProcessWire's strength and I'd be happy to explain it in more detail
    1 point
  46. Actually the site/config.php in 2.5 is stripped down to almost nothing - you need to read through wire/config.php and copy any required elements from there to site/config.php
    1 point
  47. Hello, I have a problem with the Shop-for-processwire module. Whenever I try to checkout with two variations of the same product in the shopping cart, I get this error: Error: Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'example-product-1-1388' for key 3 (in /usr/local/etc/httpd/vhtdocs/reinka/pw/wire/core/Pages.php line 692) #0 /usr/local/etc/httpd/vhtdocs/reinka/pw/wire/core/Pages.php(692): PDOStatement->execute() #1 /usr/local/etc/httpd/vhtdocs/reinka/pw/wire/core/Pages.php(614): Pages->savePageQuery(Object(Page), Array) #2 [internal function]: Pages->___save(Object(Page), Array) #3 /usr/local/etc/httpd/vhtdocs/reinka/pw/wire/core/Wire.php(359): call_user_func_array(Array, Array) #4 /usr/local/etc/httpd/vhtdocs/reinka/pw/wire/core/Wire.php(317): Wire->runHooks('save', Array) #5 /usr/local/etc/httpd/vhtdocs/reinka/pw/wire/core/Page.php(1113): Wire->__call('save', Array) #6 /usr/local/etc/httpd/vhtdocs/reinka/pw/wire/core/Page.php(1113): Pages->save(Object(Page), Array) #7 /usr/local/etc/httpd/vhtdocs/reinka/pw/site/modules/Shop-for-ProcessWire-dev/ShoppingCheckout.module(651): Page->save() #8 /usr/local/etc/httpd/vhtdocs/reinka/pw/site/module This error message was shown because you are logged in as a Superuser. Error has been logged. Does anyone have an idea what could be wrong here?
    1 point
  48. Sure! If you switch a lot between different projects you'll have to either start several instances or you'll "up" and "halt" them all the time: The first way is very "costly" in terms of performance, the second one in terms of time The generated isos tend to be quite big (around 2.5 GB): If you're working on 20+ Projects you'll either have to constantly delete (and therefore re-init) them or waste a lot of disk-space We've experienced some rather standard setups to be very slow even if we gave them a crazy amount of Memory (4GB+). This was especially the case with larger ModX sites (which has a slow backend anyway) On Windows (which we use for development) sometimes vagrant just keeped crashing on startup for unknown reasons Crazy caching behaviour: We mounted our local work folders into the VM but sometimes they just won't get updated for minutes Plus some very "Workflow related" issues that are not that important
    1 point
  49. Hi, I am wondering, is there a way to count items in the DB without returning the results? I have a site that is going to have 10,00 pages and I want to count them all. Using $pages->find(selector)->count; returns the results and I guess this is the same as count($pages->find()) just counting how many items are in the returned wire array. Not what I want. I want to count items without the overhead of getting all the data. Thanks,
    1 point
  50. We also have an API function for this: $total = $pages->count("selector"); It basically works the same as @apeisa's example and is fast/low overhead.
    1 point
×
×
  • Create New...