Jump to content

BitPoet

Members
  • Posts

    1,329
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by BitPoet

  1. I've been tweaking this a bit to work in sync with active/inactive statuses, added reasonable default behaviors for trying to access pages in non-viewable languages and made ui interaction a bit smoother, so the code has grown quite a bit. I still need to tidy it up a bit, adapt the installer/uninstall methods, add comments to the code and such and do some testing with the latest PW versions. Once I've found the time for that, it shouldn't be long until I can release a production-ready version, which should be towards the end of January.
  2. Yes, I was thinking in terms of upgrading existing installations, which, of course, is a moot point. There might be a nag if one fiddles around with exporting from an 'old' system and importing to utf8mb4 tables, but even that is not likely to come up. So best ignore my earlier worries.
  3. Correct me if I understood wrong. This looks like you're assembling the navigation menus manually. Hardcoding an absolute path for a navigation entry will of course point to the page in its default language if you don't specify a prefix for a different language. In that case, fetching the page in question and assembling the link from its properties is the way to go. Perhaps you could add a function that abstracts away the repeated verbosity. <?= navItem('/contact/') ?> <?= navItem('/faq/') ?> and further down (or in _init.php or such) add your function: function navItem($path) { $pg = wire('pages')->get($path); return "<li><a href='" . $pg->url . "'>" . $pg->title . "</a></li>"; }
  4. InnoDB is offered as an (experimental) installation option, as pointed out in this thread. So InnoDB compatibility should definitely be taken into account.
  5. Actually, that's only true for MyISAM tables with their 1000 bytes index limit. For InnoDB, field length would drop to 191 characters (max. index size of 767 bytes divided through 4 bytes per character). Going below 200 characters would IMHO be rather inconvenient and possibly dangerous. One could extend the number of indexable characters for InnoDB storage, but that gets a little more involved, as it means re-creating any existing pw database to change the storage engine from antelope to barracuda and adapt innodb_large_prefix in the server configuration. Also something not doable on a shared hosting server.
  6. Perhaps a silly question, but is $page actually the page on which you filled in the Slider1 field?
  7. Ah, sorry, I misread the line number. There's definitely a continue statement where it doesn't belong.
  8. That error message reads like you're using an outdated version of ProcessWireUpgrade.
  9. I've got PHP 7 running on my home computers and everything works like a charm. I can't say anything about massive speedups (everything's in the <10% range so far) but then, the complexity of my home playground is rather limited, but I'll start load testing in the company in January and hope to find some more impressive figures there. What bugs me a bit is that I haven't found a working server-based memory cache for Windows yet. Memcached, Redis, you name it, it's not yet available. I'm curious if I missed something there. Are there any in-memory key-value storage servers for Windows with PHP 7 support worth taking a look at?
  10. There's that idea for a social site (hard to come up with a correct term without giving too much away) I've been carrying around for ages. One thing that has always held me off was knowing that I'd need a tightly integrated forum. I've plugged a few forums onto existing sites and always regretted taking the job. So now that I've discovered PW, I decided to do it the other way round - build the forum on PW, then add everything else on top. I'm planning it to be highly interactive, so it's not something done in a week, yet it's simply incredible what PW allows you to do in a matter of a few days. Here's what I have so far (don't look to closely on the design, if I really go live with my idea, I'll have someone else with appropriate skills do the visual design). And don't mind the naming, I've only used PWForum as a working title in lack of inspiration. Start page (dynamic menu, sidebar configured using selectable widgets) It's reasonably responsive, not something I have experience with, so it's a learning curve I already asked you to overlook the visual issues, didn't I? (but hey, things are there and it validates) There's already a bunch of features like friends and badges built through page fields, but lots of the frontend logic still has to follow. A working private chat (jquery ajax polling) is already there. This is probably going to make it into the modules directory, even if it's just as proof-of-concept. Doing that I learned about the different ways of "magically" including scripts and styles. For production use, I'll have to implement some kind of memory caching in front of the webserver for all the ajax calls, which is also a new playground. Both chat and forum messages use bbcode-like markup. I'm building my own textformatter and editor bundle for that to get it lean and flexible enough. The textormatter already allows you to configure smiley patterns in the backend. There are going to be a lot of profile settings. I'm sure I'm going to have to add more than one tab. This is just a project I'm doing for fun, so I don't have a timeline, it's more about toying with things and finding clean solutions. If things work out, I hope to have everything worked out some time around Easter and bundle it as a site profile for others to disassemble
  11. Are you calling this from the command line or via http? In the latter case, my guess would go towards script execution time constraints. Are you getting a "saved" message for those failed pages? I don't think there's a limit for the number of page saves. I know I've imported a few thousand pages in one go in my last project, with each import resulting in more than two page saves.
  12. Update: Ryan has already pushed a fix for the Textformatter issue to dev. I've put together a small module that encodes relevant parts of a URL using parse_url and rawurlencode. If anybody wants to have a look, I'd be happy to get some feedback. It can be found on github.
  13. Shouldn't be too hard to incorporate into the core. Meanwhile, I've tweaked together a tiny module that adds a delete button next to the crop icon. It's not really tested with different permission settings though. github repo for ImageActionDelete
  14. I just looked at this, as umlauts and other funny characters in URL paths are going to be on the table in one of my next work-related PW tasks next year, and I'm pretty sure that FieldtypeURL currently ignores all assigned textformatters. I've already filed a bug. Also, HTML Entity Encoder is probably the wrong tool for that task. The way to go would IMHO be to rawurlencode all path components in the URL, encoding all non-reserved non-ascii characters to their percent encoding in line with RFC 3986.
  15. I'm not sure if I completely understand the goal here. Should those instances be kept and stored, or does "virtual" mean that they only exist for the purpose of rendering an output and be discarded afterwards? If it's the first, creating copies using $pages->clone() would probably be the way to go.
  16. Have a look if your mysql configuration has strict_trans_tables or strict_all_tables set. This prevents zero dates (since 5.7.4) from working. See http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-changes for details.
  17. That's probably a red herring. Initialization fails early on due to memory exhaustion, so it makes sense that Wire::$fuel is unset, as it's the property in which the Wire class stores all the magic variables you call up by invoking wire('users'), wire('pages') etc. While you're digging through the includes, have an eye out for anything that re-assigns to a reserved ProcessWire variable like e.g. $config or $users.
  18. I'm not completely convinced that the error happens where you think it does, driedstr. The Config class has no constructor at all, and Paths' one simply sets its $_root member variable. Have you tried downloading a copy of the online version and verifying with a directory diff tool like meld that the php files are really identical? Does a downloaded copy show the same error? If that doesn't help, also check INCLUDE_PATHs. Somewhere an identically named file might get included and cause the loop. If in doubt, xdebug could help you get a full trace and spot the offending file.
  19. All the selector possibilities can be quite a handful to wrap your head around One nice thing about PageArrays is that they stringify into a pipe-delimitied list of the ids of its contained pages perfect for a selector expression, so you could generalize your code to: $categories = wire('pages')->get('/news/')->children(); foreach( wire('pages')->find("parent=$categories, sort=-published") as $news ) { echo $news->title . '<br>'; }
  20. The problem's here: <?php echo date("Y/m/d h:s", $note->modified); ?> You're outputting seconds instead of minutes. Use "Y/m/d h:i" instead.
  21. PW works fine on IIS versions 7 and 8 in conjunction with Microsoft's free URL Rewrite module. I just went live with a large intranet site on IIS 8. URL Rewrite even has an option to import htaccess files, and tweaking those rules (if necessary at all) is quite straight forward.
  22. You could probably do that by hooking into ProcessPageEditImageSelect::execute and filter out unwanted fields from $imageFields before they get concatenated into $imageFieldNames (perhaps with a module that has a config field that lets you specify a list of unwanted fields).
  23. That's one solution, the other would have been to determine the field type through the page's template. $tpl = wire('templates')->get($templatename); if( $tpl->fields->get($fieldname)->type instanceof FieldtypeFile ) { /* true for file and image field types, import as file */ }
  24. The CRM part some highly specific stuff, certainly not helpful for anybody else. The modules I'll focus on getting into publishable state will be OpenSearchServerSearch (including the schema for OSS), PagePublishPerLanguage, ArticleIDLinks and ActiveDirectory/LDAP integration. If there's time left (I'm a bit cautious with promises atm, as I'm going to be rather involved in switching our ERP system next year), I'll see if I can change the translation TextFormatter into something generic and configurable and bundle everything together with the notice board into an Intranet site profile.
  25. That's hard to say. I'd have a look in your browser's developer console if there's a redirect of some kind going on (or not) that causes the problem, then look into the server logs to see if something jumps your eyes.
×
×
  • Create New...