Jump to content

Pascal

Members
  • Posts

    20
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

2,179 profile views

Pascal's Achievements

Jr. Member

Jr. Member (3/6)

2

Reputation

1

Community Answers

  1. The domain normally goes to the web root. Processwire resides in a folder /pw/ in the root and I redirect via "RewriteRule ^(/)?$ /pw [R=302]".
  2. Hi all, I try to create a new site on a server with an existing Processwire installation. I followed the steps, edited the index.config.php and created the new folder. However, I can't reach the new site via the url. My main domain redirects to mydomain.com/pw. May this be the problem? I attached screenshots of what I did so far. The installation in the temp folder succeeded. I'm grateful for any tips.
  3. 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?
  4. Hi, I'm just developing a little webshop with ProcessWire. I am trying to get an confirmation mail sent to the customer when the order is completed. Is there any way to get the content of the order confirmation page directly into the email body? I already put this into the ShoppingCheckout module: // Payment ok, order is done! else { $from = "From: <$order->email>\n"; $from .= "Reply-To: $order->email\n"; $from .= "Content-Type: text/html\n"; mail("pascal.tarris@gmail.com", __("Your Order with Reinkarnation"), $mailbody, $from); Now can I somehow get all the markup from the confirmation page into $mailbody? Thank you in advance, Pascal
  5. The space should be 1GB, the installation with all uploads has 75MB. File upload via FTP does work. Edit: I contacted someone at the webhoster. He said that the working FTP transfer is an indicator that this is probably a CMS related problem, not a server problem. Any ideas? Edit 2: I just noticed that this happens only with the fields in one specific template. Edit 3: The problem were special characters in file names.
  6. Neither 777 nor 755 seems to work. I deleted some files on the server, but it still doesn't work…
  7. The assets folder is set to 777. Are there any other permissions I could check?
  8. Hi, On my Processwire installation file uploads just randomly stopped working. Half an hour ago I could just drag and drop files into their fields. Now, when I drop a file, it opens in the browser window. When I chose a file via the dialogue and save, nothing happens. I remember this happend already with Processwire 2.3 on another server but am not sure how or if it was solved. Thanks in advance for any hints, Pascal Edit: Seems ProcessWire doesn't like umlauts in file names. Two hours wasted, but at least I know what it was. And apart from that, ProcessWire is working like a charm. Thanks RJay for your suggestions!
  9. I had exactly the same problem. I added the permission page-publish under permissions, added it to the superuser role (or whatever role should get the permission to publish). When trying to publish a previously created page, it still didn't work. The problem was that the pages I created without the permission to publish had the checkbox "Unpublished" in the "Settings" tab checked by default, which was not removed by clicking the "Publish" button. So if you already created pages without the permission, you'd have to change that manually. @Ryan: This was a clean install of Processwire (which I installed because of this problem). Any ideas, why the page-publish permission hadn't been added when installing? Could be quite frustrating for new users to install Processwire and not being able to perform the first action most people do when installing a new CMS: Publishing a test page to see if everything is working fine. Edit: I also cleaned the cache. But I don't know if this did anything to solve the problem as I simultaneously figured out that the permission was missing.
  10. Thanks for the hint. However, the argument $small seems to refer to the abbreviated lists like category views, not the paginated list of all articles (the "standard" blog view). I did this and it doesn't have any effect: <?php foreach($posts as $page) { $pagecount = count($posts); if(!$small) { include('./post.php'); } else { include('./post-list.php'); } } ?> While this works, albeit only if there are multiple posts on a paginated page: <?php foreach($posts as $page) { $pagecount = count($posts); if($pagecount == 1) { include('./post.php'); } else { include('./post-list.php'); } } ?>
  11. Well, I forgot that this would not work if there is only one post to display in the list. Does anyone have an idea?
  12. Hi! I am working on customizing the Blog Profile. I wonder if it is possible to have different markup for individual posts and the paginated post list. I edited the markup/post.php for the view of an individual post. However, in the post list, several elements should not be shown. For example, I need the headline of the posts in the blog's landing page to have different classes than when viewing an individual post. First I thought this was because markup/posts.php includes markup/post.php. So I created markup/post_list.php and included it in markup/post.php. However then a single blog post was also rendered with the markup from markup/post_list.php. I don't know if there is any easy solution, I can't wrap my head around how some of these files are connected. Can anyone help me on this one? Edit: Got it! Just count the elements of the $posts array and generate different markup if it is > 1. <?php $pagecount = count($posts); if($pagecount == 1) { $parentpage = $page->parent->url; echo "<div class='arrow'><a href='$parentpage'>←</a></div>"; } ?> However, feel free to suggest anything easier or more elegant.
  13. Edit: Sorry for the Title which has nothing to do with what you are hopefully about to read. I was about to write on a different topic and got carried away. Hi there! I just watched the video for the new repeatable fields and this seems to be one of the last features that were missing. It is great! First I thought it would solve the problem I am about to describe, but then noticed that it wouldn't. I am currently building a page for myself and want to have a modular layout. I don't want a classic layout with a body, a sidebar and a definite number of editable fields per template. What I want to achieve in the content of my page are floatig (inline-blocking, to be accurate) columns which can be added more dynamically. For example, I could have the following "blocks" to build my page's body: A = A column which has a width of 20em B = One with a width of 42.5 em C = One with a width of 65 em D = One with a width of 65 em and a dark background So let's say I want three pages where content is supposed to be arranged like this: A A A A B__ C____ A A A D____ B___A A A A B___A A A A A A A The normal way would be creating four fields (A, B, C, D) and three templates where these fields are placed in the order described above. The problem is that if I wanted to create a fourth layout, I would have to create a fourth template. As you can see, there is a quite large number of possible combinations. What I want to achieve is the liberty to add new layouts and rearrange content independently of the code out of a set of blocks. Think of it like a letterpress where you can exchange individual characters and rearrange them as you like. At the moment I am creating each block as a child of the page where it should be placed and assign css classes based on the template name (for example, echo <div class="$templatename">$page->body</div> for each child) Unfortunately, that means that the individual parts of a page appear as individual Processwire pages and clutter the site tree. While this approach is useable, it is not very elegant and abuses the pages for lower-level objects which are not meant to be accessed single pages. Now this is a feature suggestion and I am feeling bad for it because I value all the hard work that has gone into this great CMS. This is what I was thinking about: How about allowing users not only to add but to create sub-pages to a page while editing it. Much like the repeating fields which create pages in the background and add a page with the same template over and over again, one could chose from a previously set range of templates (like the template limitation for child pages: allow template-a, template-b and template-c to be added as fields to this template). So one could still render all sub-pages through the markup but would only have to add a new field and some CSS if he wanted to have a field E, which might be a 20em wide column with pink background and bright green text in Comic Sans. I hope what I wrote made sense to you and would be very happy if someone suggested a workaround that already exists and that I completely missed until now.
  14. Thanks for your replies, I am going to look into both!
  15. Hi, I am a complete beginner in coding PHP and stumbled upon this problem. This is the code: <?php $contentpages = $pages->get("/content/")->children; unset($contentpages[0]); echo $contentpages; $footersections = $pages->get("/footer/")->children; echo $footersections; $navlinks = array_merge($contentpages, $footersections); echo $navlinks; foreach($navlinks as $link) { $class = $link === $page->rootParent ? " class='on'" : ''; echo "<div class='nav-button'><a$class href='{$link->url}'>{$link->title}</a></div>"; } ?> So first I get the children of the content page and exclude the first one, which is the homepage. The first echo spits out an array of two values. Then I repeat the procedure for sections in the footer which I want to link to. The second echo shows me those values. But then, after using array_merge to merge(?) the arrays, the resulting variable is empty. I suppose I made a really stupid mistake somewere along the way? By the way, let me know if anything more elegant comes to your mind, I am eager to learn.
×
×
  • Create New...