Jump to content

Robert Zelník

Members
  • Posts

    77
  • Joined

  • Last visited

Everything posted by Robert Zelník

  1. I have all multi-language related modules activated. I have successfully changed all fields to TextLanguage, TextareaLanguage etc. When I try to change the Title field from PageTitle to PageTitleLanguage and confirm the change, it shows this error: Recoverable Fatal Error Argument 1 passed to LanguagesPageFieldValue::__construct() must be an array, string given, called in /[path_to_pw]/wire/modules/LanguageSupport/LanguageSupportFields.module on line 301 and defined (line 33 of /[path_to_pw]/wire/modules/LanguageSupport/LanguagesPageFieldValue.php) This error message was shown because you are logged in as a Superuser. Error has been logged. How can I change the Title field to multi-lingual? UPDATE: I have compared the database dumps before the change and after the change. The only difference is this: table `fields`: < (1, 'FieldtypePageTitle', 'title', 13, 'Title', '{\"required\":1,\"textformatters\":[\"TextformatterEntities\"],\"size\":0,\"maxlength\":255}'), > (1, 'FieldtypePageTitleLanguage', 'title', 13, 'Title', '{\"required\":1}'), Reported also on Gitub: https://github.com/r...sWire/issues/98 UPDATE2: I have reproduced this error on a fresh new installation. I have found that this error doesn't occur when I create a second language before changing the title to PageTitleLanguage.
  2. This is great news, I didn't know about that. Thanks Ryan. Later I realized that I can use git to keep the code up-to-date (it isn't a revolutionary idea ).
  3. Ryan, do you have any news regarding minor versioning of ProcessWire? It's somewhat difficult to maintain multiple ProcessWire installations in the current state, if the information about minor version is missing, so I actually don't know which version of PW2.2 is used. I suggested earlier to do that by adding tags in git (like 2.2.1, 2.2.2 etc.). It would also be great to add the minor version info in README.txt or in VERSION text file. Would be that the right way for ProcessWire, or do we need to find another method?
  4. Ok, now I understand the point. It's fixed now. I also saved some characters by removing the semicolons before ?> . I agree with Ryan. The distributable code should use <?php due to compatibility.
  5. Diogo, there is a difference: <?= is equal to <?php echo while <? is a shorthand to <?php
  6. Thanks for all suggestions. Following the Soma's template, I have created a master layout template (functionally identical with the default PW template), that looks like this: <!DOCTYPE html> <html lang="en"> <head> <? include "blocks/htmlhead.inc" ?> </head> <body> <p id='bgtitle'><?= $page->rootParent->title ?></p> <div id="masthead" class="masthead"> <div class="container"> <? include "blocks/masthead.inc" ?> </div><!--/container--> </div> <div id="content" class="content"> <div class="container"> <div id="sidebar"> <? include "blocks/sidebar.inc" ?> </div><!--/sidebar--> <div id="bodycopy"> <? include "views/{$page->template}.inc" ?> </div><!--/bodycopy--> </div><!--/container--> </div><!--/content--> <div id="footer" class="footer"> <div class="container"> <? include "blocks/footer.inc" ?> </div><!--/container--> </div><!--/footer--> <? include "blocks/editpage.inc" ?> </body> </html>
  7. Thanks Diogo, that's what I was looking for. I didn't know about that topic. I like the suggested solutions.
  8. Currently the template files are basically divided in three parts: head.inc the current content template foot.inc Are there any reasons to do it that way? I would like to suggest a well-established way of templating, where the whole page layout is in one file (head and foot together) and this layout template can include sub-templates for particular blocks of content, including the current content template. This way would better support an appropriate level of granularity: easier layouts/templates could be included in one or two files and more complex layouts/templates could be splitted to as many parts as needed. What do you think?
  9. Thanks Ryan. It works well, just with two little bugs: the ending bracket in the JS code is missing now it doesn't show the successMessage. I have changed the code to this: $(document).ready(function() { var $input = "<input type='hidden' name='security_field' value='1' />"; $("#CommentForm form").append($input); $("#CommentForm").show(); });
  10. I would like to have some alternatives to Akismet for comment spam filtering, because Akismet is a bit expensive solution for low traffic small business sites. Possible solutions: text Captcha (math tasks, simple riddles...) reCaptcha mollom.com integration
  11. Yes, that are the right commands. Maybe after renaming the P21 repository it would be useful to create a new temporary "P21" repository with a README file with a message about the name change.
  12. I didn't know that you have a separate local branch. In this case it's ok. Git tags are always created locally, they have to be pushed to the remote server (GitHub in this case) by this command: git push --tags It seems that it is not possible to set a Github redirect from the old repository to the new one. Local repository update: I used to do this in the GUI frontend (gitg), so I am not familiar with the command line, but this should work: git remote rm origin git remote add origin git://github.com/someuser/newprojectname.git Or in recent versions of git: git remote set-url origin git://github.com/someuser/newprojectname.git http://gitref.org/remotes/ http://stackoverflow...-name-in-github
  13. Ryan, in my opinion the first important step should be to stabilize the state of the releases. Currently, when the download link on the home page refers to the master branch on github, it doesn't actually refer to the stable 2.2 release, but to the development version, which is changing with each new commit to the master branch. There should be a particular commit tagged "2.2" and the links should refer to that tag, otherwise you can not guarantee that the package for download is really working as expected.
  14. Maybe some mess will happen, but I don't see this as a big issue. People will see that the pull request doesn't work, so they can check Github or processwire.com and they will find a message about the update. It's quite common situation for open source projects that sometimes they change their name or move to another code hosting service.
  15. Ryan, you can easily create a release for download by adding a tag to a particular commit (git tag "tag_name"). This tag can be a version number (for example "pw2.3"). Then you can push your local tags to Github (git push --tags). It will automatically create a download file with a tag name + .zip extension. Look at this: https://github.com/c...hp/cakephp/tags That's how it works.
  16. Ryan, you can rename your Github repository without concerns, your watchers will remain untouched (I have checked it with my repository). Just go to admin > Settings > Repository and set the name you want.
  17. Regarding multiple parents topic - check this discussion: http://processwire.com/talk/topic/71-categorizingtagging-content/page__p__2266__hl__+multiple%20+parents__fromsearch__1#entry2266
  18. When I create a new web site, I use two installations: a local (devel) site, where I test new changes, and a remote site, where I apply these changes when they work well. I would like to avoid duplicate work with creating fields and templates twice. Is there any intelligent way to clone these fields and templates between the local site and the remote site?
  19. In this case I use very easy passwords like "you123". Maybe there's something wrong with my local PW installation or with my Apache settings. I copied the local installation on a remote server, then I reset the password on a remote via email. I checked it and successfully logged in. Then I copied the whole database from the remote back to the localhost and the password which worked well on the remote didn't work on the localhost. No problem, I will work with a remote site.
  20. Is this working with ProcessWire 2.2? I see in field_pass table that the hash is changed after loading the template, but I can not login with this changed password.
  21. I was unsuccessful with URL segments gateway, so I decided to follow the "multiple-site, multiple-database" path. It works well for me.
  22. Yes, I set it directly in the core because I didn't know that I can change it on the web interface. Now I know. I agree, it's better to not change the core. Apeisa, we can differentiate that by naming "multi-site-single-db" vs "multi-site-multi-db". I will try your suggestions and let you know what's happened. Thanks for help.
  23. Ryan, your solution looks good. I put your code in my template, file head.inc. I set 'urlSegments' => 1 in wire/core/Template.php. The $input->urlSegments always returns empty array for me. Perhaps I am doing something wrong?
×
×
  • Create New...