antoiba86
Members-
Posts
10 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
antoiba86's Achievements
Jr. Member (3/6)
2
Reputation
-
Fatal error when installing module LanguageSupportPageNames
antoiba86 replied to antoiba86's topic in Multi-Language Support
I did as you say, but now I have a new error when trying to install from scratch. And I see that it is a common problem. -
I am a bit confused, because I don't know how to solve this problem. When I install the module Languages Support - Page Names, my web falls apart. I have all the necessary modules installed as Language support for example. This is the error I get in the admin panel. Warning: Invalid argument supplied for foreach() in /hosting/www/antoibaprogramming.com/public/wire/modules/LanguageSupport/LanguageSupportPageNames.module on line 107 Warning: Invalid argument supplied for foreach() in /hosting/www/antoibaprogramming.com/public/wire/modules/LanguageSupport/LanguageSupportPageNames.module on line 198 Warning: Invalid argument supplied for foreach() in /hosting/www/antoibaprogramming.com/public/wire/modules/LanguageSupport/LanguageSupportPageNames.module on line 1011 Warning: Invalid argument supplied for foreach() in /hosting/www/antoibaprogramming.com/public/wire/modules/LanguageSupport/LanguageSupportPageNames.module on line 1011 Warning: Invalid argument supplied for foreach() in /hosting/www/antoibaprogramming.com/public/wire/modules/LanguageSupport/LanguageSupportPageNames.module on line 1041 And this in the front-end. Warning: Invalid argument supplied for foreach() in /hosting/www/antoibaprogramming.com/public/wire/modules/LanguageSupport/LanguageSupportPageNames.module on line 107 Fatal error: Call to a member function get() on null in /hosting/www/antoibaprogramming.com/public/wire/modules/LanguageSupport/LanguageSupportPageNames.module on line 605 Fatal error: Call to a member function get() on null in /hosting/www/antoibaprogramming.com/public/wire/modules/LanguageSupport/LanguageSupportPageNames.module on line 605
-
Many thanks. Sometimes I think that my brain it's broken because I think of that but I didn't actually "see" it so with your comment I could resolve. I work every day and later I am very tired. I put the code. I know it's a bit dirty but well, it's my blog and I don't mind very much. It's work and that's the only important thing. In the blog template, I wrote this code and now it works. <div id='content'> <?php echo ukHeading1(page()->title, 'divider'); $pages_not_blog = page()->children('limit=10'); foreach ($pages_not_blog as $page_not_blog) { if ($page_not_blog->name === "blog") { $posts = $page_not_blog->children('limit=10'); echo ukBlogPosts($posts); } } ?> </div>
- 3 replies
-
- 1
-
- fatal error
- home
-
(and 1 more)
Tagged with:
-
Well, I am trying to put the blog template like the home template but when I change the home template to the blog template the page explote. The version is processwire 3.055 and this is the website. http://www.antoibaprogramming.com/ I think that the error is because that when is the home, the blog template try to look for the blog post but it didn't find anything so it crashes. Here is the error that it gave me. And here is the code. The line 660 is the "$n = $page->comments->count();" function ukBlogPost(Page $page, $options = array()) { $defaults = array( 'summarize' => null, // Display blog post summary rather than full post? (null=auto-detect) 'metaIcon' => 'info', 'moreIcon' => 'arrow-right', 'moreText' => __('Read more'), 'categoryIcon' => 'hashtag', 'bylineText' => __('Posted by %1$s on %2$s'), ); $options = _ukMergeOptions($defaults, $options); $title = $page->title; $date = $page->date ? $page->date : $page->createdStr; $name = $page->createdUser->name; $body = $page->body; $metaIcon = ukIcon($options['metaIcon']); $moreIcon = ukIcon($options['moreIcon']); $categoryIcon = ukIcon($options['categoryIcon']); $n = $page->comments->count(); $numComments = $n ? "<a href='$page->url#comments'>" . ukIcon('comments') . " $n</a>" : ""; if($options['summarize'] === null) { // auto-detect: summarize if current page is not the same as the blog post $options['summarize'] = page()->id != $page->id; } $categories = $page->categories->each($categoryIcon . "<a class='uk-button uk-button-text' href='{url}'>{title}</a> " ); if($options['summarize']) { // link to post in title, and use just the first paragraph in teaser mode $title = "<a href='$page->url'>$title</a>"; $body = explode('</p>', $body); $body = reset($body) . ' '; $body .= "<a href='$page->url'>$options[moreText] $moreIcon</a></p>"; $class = 'blog-post-summary'; } else { $class = 'blog-post-full'; } if($options['summarize']) { $heading = "<h2 class='uk-margin-remove'>$title</h2>"; } else { $heading = "<h1 class='uk-article-title uk-margin-remove'>$title</h1>"; } $byline = sprintf($options['bylineText'], $name, $date); // return the blog post article markup return " <article class='uk-article blog-post $class'> $heading <p class='uk-margin-small'> <span class='uk-article-meta'> $metaIcon $byline </span> <span class='categories'> $categories </span> <span class='num-comments uk-margin-small-left uk-text-muted'> $numComments </span> </p> $body </article> <hr> "; } The question is how can I make to put the blog like the principal page. I don't have any idea how to do it.
- 3 replies
-
- fatal error
- home
-
(and 1 more)
Tagged with:
-
Great, I really like the new design and the blog is really cool.
-
Could I use Hanna Code inside the blog post? I am trying to use some and the post doesn't recognize them. I looked for in this topic but I didn't find anything useful... maybe I am not using the right words. Sorry for the inconvenience.
-
Ok, I am looking for the option to put the class='post-byline' after the content of the post. I found the code, but I don't know where to change the variable $option. $author = $options['post_author'] == 1 ? "<span class='author'>" . $options['post_author_text'] . " " . "<a href='{$page->authorURL}'>{$page->authorName}</a></span> " : ''; $date = $options['post_date'] == 1 ? "<span class='date'>" . $options['post_date_text'] . " " . $page->blog_date . "</span>" : ''; I found the way the change it using the "hard way". I mean by deleting the $options['post_author'] == 1 and everything but I would like to know where is that option. Thanks in advance.
-
For me, it works perfect, congratulations.
-
Thank you for your reply. But can I downgrade PW without problem? I have the ProcessWire 3.0.35 so I don't know but I would like to try the blog.
-
Hello everyone. First off I am totally new to PW and if I am sincere to program, I was assigned PW like a little project on my studies but I love it. I wanted to start a blog but I get an error I dont' quite understand. When I try to enter to post in the blog section from the admin panel. I get this error: The other items of the submenu are ok and I don't receive any error bt there yes. I have the last version of PW.