Jump to content

BitPoet

Members
  • Content Count

    891
  • Joined

  • Last visited

  • Days Won

    40

BitPoet last won the day on January 24

BitPoet had the most liked content!

Community Reputation

2,095 Excellent

4 Followers

About BitPoet

  • Rank
    Hero Member

Profile Information

  • Gender
    Male
  • Location
    Near Munich / Germany
  • Interests
    programming, writing, scuba diving, long distance hiking

Recent Profile Visitors

5,990 profile views
  1. I've done both so far. Since we use PW for our corporate intranet, there are a number of additional databases we pull data from, which is quite straight forward (just an include that instantiates a new WireDatabasePDO and wire()s it). We have a search interface to our test report database where all the data for on-site test runs of our machines are stored, pull in infos about the processing state of lab samples and display an ajax loading tree of standard parts lists for the project engineers from the ERP. Other DBs have been converted to PW pages, like e.g. the archive for the old support ticket system. We even have a mix at some places. For our sales department, we pull the contact information for our worldwide offices from the ERP, create pages if they don't exist yet, and the department augments these pages with additional infos like contractual details that the ERP can't store without climbing through major hoops. We have a semi-live attendance list (the most visitied page by far) filled with data combined from PW's user list (synchronized from Active Directory), attendance status from the time accounting software and person info like the building/room number from the ERP, with the HTML output being generated every five minutes by a background job to ease server load a bit. We have some additional, non-PW tables in the PW database for speeding up things, like caching the listings of large directories with parts drawings, and even wrote our own CKEditor plugins to easily embed links or image tags for these files. You could say PW runs as a big "spider web" that connects all the apps in our company, with data being pulled in wherever necessary. There are a few apps where we thought about storing the content in PW but decided against it due to the sheer amount of data and the performance impact PW's normalization would bring. Right now we're at around 25k pages and a little over 100 fields in 50 templates. We use the UserGroups module and template settings to limit backend access to individual templates and keep the list of available templates short for our editors (~60 editors who never see more than 6 templates in their selection list). Our intranet was built on a different CMS in 2006 and migrated to PW a few years ago, and the possibilities we gained were simply astonishing. It's always fun to have a sales rep for one of the intranet platform solutions on site and, after listing to their spiel about the great features they offer, show them what we have and ask innocently, "How much work would it be to implement all of this?"
  2. @Manuel, could you try commenting out the setTrackChanges method in core/Wire.php and replacing it with the following code? protected static $resetTrackChangesItems = array(); public function resetTrackChanges($trackChanges = true) { $isRoot = count(self::$resetTrackChangesItems) == 0; self::$resetTrackChangesItems[$this->id] = true; parent::resetTrackChanges($trackChanges); foreach($this->data as $key => $value) { if(is_object($value) && $value instanceof Wire && $value !== $this) { if($value instanceof Page && isset(self::$resetTrackChangesItems[$value->id])) continue; $value->resetTrackChanges($trackChanges); } } if($isRoot) self::$resetTrackChangesItems = array(); return $this; }
  3. Wouldn't that be fixed too with the correction in the linked issue? The cited error (Wire.php line 1069) points to setTrackChanges.
  4. Here's a way to find all self-referencing page fields. Open your MySQL interface (MySQL Workbench, phpMyAdmin, adminer, whatever...) and execute the following query: SET @oldgcmaxlen = @@group_concat_max_len; SET SESSION group_concat_max_len = 32768; SELECT GROUP_CONCAT(querystring SEPARATOR 'UNION\n') as sqlstring FROM ( SELECT 1 as something, CONCAT( 'SELECT x.pages_id as id, y.name, z.data as title, \'', a.name, '\' as fieldname\n', 'FROM field_', a.name, ' x\n', 'JOIN pages y ON y.id = x.pages_id JOIN field_title z ON z.pages_id = x.pages_id WHERE x.pages_id = x.data\n' ) as querystring FROM fields a WHERE a.type = 'FieldtypePage' ) as inmemtbl GROUP BY something ; SET SESSION group_concat_max_len = @oldgcmaxlen; The result will be a UNION query that checks all your page fields for direct recursions. Here's an example: SELECT x.pages_id as id, y.name, z.data as title, 'permissions' as fieldname FROM field_permissions x JOIN pages y ON y.id = x.pages_id JOIN field_title z ON z.pages_id = x.pages_id WHERE x.pages_id = x.data UNION SELECT x.pages_id as id, y.name, z.data as title, 'roles' as fieldname FROM field_roles x JOIN pages y ON y.id = x.pages_id JOIN field_title z ON z.pages_id = x.pages_id WHERE x.pages_id = x.data UNION SELECT x.pages_id as id, y.name, z.data as title, 'language' as fieldname FROM field_language x JOIN pages y ON y.id = x.pages_id JOIN field_title z ON z.pages_id = x.pages_id WHERE x.pages_id = x.data UNION SELECT x.pages_id as id, y.name, z.data as title, 'pagesel' as fieldname FROM field_pagesel x JOIN pages y ON y.id = x.pages_id JOIN field_title z ON z.pages_id = x.pages_id WHERE x.pages_id = x.data Copy that query into the SQL editor and execute it. If there are any recursions, you will see them listed with the page id, page name, page title and field name.
  5. Maybe you could get some inspiration there from (or even improve on) my JsonNativeField module since MySQL supports searching inside JSON data.
  6. Have you checked in the browser's developer console if there are javascript errors or resources that failed to load?
  7. In Template context, is (currently) is, since the only flag currently defined for templates is the system flag. But @LostKobrakai is correct that iterating $templates isn't really a hardship (and likely faster anyway since there are no selectors parse).
  8. ProcessWire doesn't like module names that have an uppercase letter at the second position, so switching that to lowercase should fix it. Just change CCBillIntegration to CcBillIntegration.
  9. You're welcome. You can set the useLanguages flag on the CKEditor field to get multi language support. $message->useLanguages = true; The only thing you need to aware of is that, as far as I know, there is no fallback to the default language's value if the value in the current language is empty.
  10. The hooks in that list look good to me. A bit of a shot in the dark, but you might try and disable frontend editing in case it is enabled and see if that changes anything.
  11. Just a thought: could there be a before hook on Page::render (perhaps from a 3rd party module) that replaces the original function and prevents after hooks from running? You can see all active hooks with trace with that little snippet: $allHooks = $hooks->getHooks($page, 'render'); bd($allHooks); Make sure to visit a page on the frontend, otherwise ProcessPageRender won't be invoked and Page::render won't even exist (at least that's the case here when testing on 3.0.96.
  12. Just use InputfieldCKEditor directly instead of InputfieldTextarea. You're talking about direct application of Inputfields here. The inputfieldClass needs to be set if you are attaching a field (a FieldtypeTextarea, not InputfieldTextarea) to a template for use in pages.
  13. No reason to worry there. rdbms.strato.de is big load balancing server that hands off the connections to other computers in the store.d0m.de domain. The error says that the individual backend server doesn't respond. That might e.g. be due to a high load there or a bad timing when a switch over to a different server occurs, so Strato support are the only ones who can shed some light on the real cause.
  14. And don't forget to exclude/empty the site/assets/cache directory.
  15. Any chance that it could be a file system permissions issue on the production server in the site/assets/files path?
×
×
  • Create New...