AndreasWeinzierl

Starter
  • Content count

    18
  • Joined

  • Last visited

Community Reputation

1 Neutral

About AndreasWeinzierl

  • Rank
    Jr. Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. AndreasWeinzierl

    If I set a title of a page to "<15kWh/qm/anno" operations on that page fail. For instance at creation no name is generated, so the path is // instead of /name/. Also the admin page list setting does not work anymore with that sequence of symbols.
  2. AndreasWeinzierl

    Okay, next issue: I tried tracyDebugger, but somehow I cannot find the dumps or set working breakpoints. So I tried xdebug. When I just run the request in PHPStormer, the breakpoints I set are being ignored/and/or I cant get over the initial first lines of index.php. After wire->config I get an exception (but only with debugging). So I tried a little around and finally I started the debugging the browser and got the following error: Warning: Uncaught Error: Class 'ProcessWire\WireDebugInfo' not found in www\wire\core\Wire.php:1758 Fatal error: __debuginfo() must return an array in www\index.php on line 35 What am I doing wrong?
  3. AndreasWeinzierl

    Update: After putting the files into the directory one still has to perform an installation (via the admin interface -> other possibilities?) So access problem solved.
  4. AndreasWeinzierl

    Okay, I guess I do not need to include a module, however, I do not get it to work. It alsways says Class ProcessWire\Classname not found in my file. However, if I rename a already available module, e.g. helloworld, I also cannot access it anymore? What does happen there? Where do I have to flip the bits?
  5. AndreasWeinzierl

    Furthermore, does one module always represent one class with modulename = class name? Should each individual module have an own folder = modulename? Did I miss an example where all this is shown?
  6. AndreasWeinzierl

    Thanks for your reply. I think I am gonna go with the module approach. Do I have to include it, too? Probably, since I cannot access it easily. How would I add it to composer to autoload it appropriately? I guess psr-4 is not possible?
  7. AndreasWeinzierl

    Hey there, I am currently building an API with Process Wire. Because the retrieval of data (although using pages) is a little complex, I would like to separate this from the template. Is it a good idea to, for instance, put kind of a repository class into into the the modules directory? Would there be a better option? Should I also derive from "Module" and add a module ending?
  8. AndreasWeinzierl

    Yeah saw them. Regarding my use case: Do you think it is better to use subpages?
  9. AndreasWeinzierl

    "classmap": [ "vendor/NinjasCL-archive/pw-rest/rest/core/", "vendor/NinjasCL-archive/pw-rest/rest/languages/", "vendor/NinjasCL-archive/pw-rest/rest/login/" ], With this I finally got it working after quite a few hours.
  10. AndreasWeinzierl

    Could somehow help me? I added my vendor folder in the root directory. And I supplemented my composer.json by a library from github: { "repositories": { "pwRest": { "type": "package", "package": { "name": "NinjasCL-archive/pw-rest", "version": "1.3.0", "source": { "url": "https://github.com/NinjasCL-archive/pw-rest", "type": "git", "reference": "master" } } } }, "name": "processwire/processwire", "type": "library", "description": "ProcessWire CMS/CMF", "keywords": [ "processwire", "cms", "cmf", "content management system" ], "license": "MPL-2.0", "homepage": "https://processwire.com", "authors": [ { "name": "Ryan Cramer", "email": "ryan@processwire.com", "homepage": "https://processwire.com", "role": "Developer" } ], "require": { "php": ">=5.3.8", "ext-gd": "*", "NinjasCL-archive/pw-rest": "1.3.*" }, "autoload": { "psr-4": { "restApi\\":"vendor/NinjasCL-archive/pw-rest/rest/core" }, "files": [ "wire/core/ProcessWire.php" ] } } Compose install does work without any problems, but if I try to use autoloading it does not work as wished. Within the templates folder I try to instantiate RestApi\Response or \restApi\Response, but I always get the following error: Error: Uncaught Error: Class 'RestApi\Response' not found in phpFile.php:12 Stack trace: #0 www\wire\core\TemplateFile.php(287): require() #1 www\wire\core\Wire.php(380): ProcessWire\TemplateFile->___render() #2 www\wire\core\WireHooks.php(723): ProcessWire\Wire->_callMethod('___render', Array) #3 www\wire\core\Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\TemplateFile), 'render', Array) #4 www\wire\modules\PageRender.module(514): ProcessWire\Wire->__call('render', Array) #5 www\wire\core\Wire.php(383): Proce (line 12 of phpFile.php) BTW. The response class is in "vendor/NinjasCL-archive/pw-rest/rest/core/response.php"
  11. AndreasWeinzierl

    OK, thanks for your input.
  12. AndreasWeinzierl

    so the most efficient query would still be some form of: if($pages->count("/contract/")){ // exists } ?
  13. AndreasWeinzierl

    And it is still the best way to go?
  14. AndreasWeinzierl

    From the point of view of providing a own rest API, is this tutorial still up to date?
  15. AndreasWeinzierl

    As now, is it possible to define a default value for a field? It would be very handy for a use case. However I have read that this could be a design issue. My use case is the following: Pages have a subpage text. The application allows customization on the text based on a entity. So by default the entity is "Default" (thus a default in the admin panel), but sometimes it could be entity1, entity2. So I have a page with the fields Type and text. I already have considered just having a text and for that text again subpages for entity1, entity2, … But I am not sure if it is really better.