Jump to content

nurkka

Members
  • Posts

    130
  • Joined

Recent Profile Visitors

8,900 profile views

nurkka's Achievements

Sr. Member

Sr. Member (5/6)

55

Reputation

  1. I would recommend Markup Regions over storing markup in PHP-variables, because then you can work with actual markup and have good code highlighting and autocomplete. Also, try using custom page classes for the business logic of your templates. This was a huge game changer. And you could also use RockFrontend and LATTE - which I would recommend, because in my opinion it is better to use a "real" template engine and not PHP for writing markup.
  2. I just discovered this post from @interrobang with an update for the PHPStorm Metadata File .phpstorm.meta.php in /wire/core/ . Although this has not directly anything to do with LATTE, I leave the link here because it really helps with autocompletion/code suggestions in PHPStorm, e.g. it now also suggests hooks. Thanks @interrobang!
  3. Hi all! I currently have fun using latte templates within ProcessWire via RockFrontend. After trying for many weeks now, I was finally able to implement some code completion / code suggestions by doing this: {varType ProcessWire\DefaultPage $page} <section class="container"> <div class="row"> <div class="col"> {$page->doSomething()} </div> </div> </section> So, by adding the first line, my IDE (PHPStorm) recognizes the $page variable and gives me code completion/suggestions, e.g. listing all available methods of $page (which in this case has the class DefaultPage). But I had no luck with the ProcessWire functions like page(), config(), etc. – they are not recognized at all by the IDE. Does anyone know how to make an IDE aware of those functions in LATTE? It would be great if one could use LATTE exactly as if one was writing PHP.
  4. Hi all, when using the following selector, ProcessWire finds all pages, not only those with the CheckboxReversed "checkbox_export" checked. $ps = pages()->find('checkbox_export!=1, sort=id, include=hidden, status<' . Page::statusTrash); foreach($ps as $p){ var_dump($p->title); } As a workaround I added the following condition: $ps = pages()->find('checkbox_export!=1, sort=id, include=hidden, status<' . Page::statusTrash); foreach($ps as $p){ if ($p->hasField('checkbox_export')) var_dump($p->title); } I wonder if there is any "native" selector technique, where you can check if a field exists on a page. Something like "has_field", but that does not exists. At least I found nothing in the docs. Does anyone know the trick, if there is any?
  5. Thanks @kongondo ! I'll send you the login data in a PM.
  6. Thanks @bernhard ! And if the client already changed and added content, one could possibly use a tool to export pages on the remote server and import them in the local environment, if that is necessary. I'll have a look at ryan's ProcessPagesExportImport module.
  7. My last project has finally been launched, but there were still a few subsequent changes that I made locally in my DDEV. So, I downloaded the DB and newer files from the remote server, made the changes locally and then uploaded the whole thing again. By doing that, I accidentially deleted contact form entries that had arrived in the meantime. That's no problem in this small project, but leads to the conclusion, that one could not use such a workflow in websites with any frontend user generated content - even if it is only a simple contact form that saves its entries. Also timestamps of pages and log data like from ProcessChangeLog would not be preserved. Unless one would have a second database and “somehow” collect all user-generated data in the second database. So the idea would be: one database for core, modules, fields, templates and settings – and another database just for "user stuff" like contact forms, log data, etc. Would be interesting, if there are any approaches for this, or if anyone has ever done this before!
  8. Hi @kongondo , the described error still persists, and we can't update the ProcessWire version. Do you have any hints what I can do to avoid this error or is there a bugfix release of MediaManager?
  9. I am using ProcessWire as CMS for a shop system. I wanted to prevent ProcessWire-URLs from getting called directly, so I redirected all requests, which were not from the shop system, to the start page of the shop. That includes also POST-requests. Now, I restricted the redirects to GET requests only, and that works also with the newer TracyDebugger versions. Also, I have a condition which checks if the request goes to the frontend or to the backend. I think a request to "./" is to the backend and therefore it worked, but now "/" goes to the frontend, which is redirected in any case.
  10. I tested all TracyDebugger versions back to 4.26.26 and the issue starts with version 4.26.27. It is the following line in /panels/ConsolePanel.php: # /panels/ConsolePanel.php line 406 xmlhttp.open("POST", "/", true); When I change the line to it's previous version, it works for me: xmlhttp.open("POST", "./", true); Could that be some hosting specific issue? Could it be triggered by .htaccess rules? Okay, I deleted my ready.php and it works too, so it's likely a correlation with some crazy redirect stuff I am using. I'll test that ... Edit: Yes, my redirect code in ready.php caused the error. Thanks for your help @adrian – and thanks again for the great TracyDebugger module. I couldn't imagine to ever work without it again!
  11. Thanks @adrian , refreshing the modules did not change anything, but I could narrow the issue down a little bit, because it just occurs on websites of the same "type" I was making. I.e. they are using the same set of modules and a lot of the same template code. I think I will now search in my template code first ...
  12. Here is a quick report regarding one of the newest versions. I tested 4.26.42. In this version, the PHP console doesn't work anymore: The output window only shows "0:". Tested on two different hosting providers with three different PW installations. Downgrading to Tracy Debugger 4.26.26 fixes the problem.
  13. Hi all! I am relatively new to RockMigrations and admittedly don't (yet) understand every aspect. In my last project, I worked successfully with a local DDEV processwire installation and manually deployed that to a staging and a production server. The client now had some changes and extra wishes after the launch, which I implemented in my local version of the website. In the meantime, the client also made changes on the production website. So now, I have two different versions of the websites's content in the database. Of course I have the migrations for fields and templates in my migrations files, so this is not a problem. But I will definitely lose the changes I made locally to existing pages, like adding the newly implemented content elements and their content, because now, after the website's launch, I can't simply overwrite the production database with my local one. Is there a way in RockMigrations, to write Migrations to add content to existing pages? In my case, I used RockPageBuilder, and added new RockPageBuilder blocks to several pages, and filled them with new content. How do you deal with such a situation in your workflow?
  14. @bernhard In my case, installing DDEV within WSL2 didn't work. I then switched to the Windows version of DDEV, so now I have DDEV as a Windows program, using Mutagen ... I didn't try again to install it within WSL2, because it didn't work in the first place, and that did cost a lot of time ... and I can have all the files in my "normal" filesystem. But if using DDEV within WSL2 is the way to go on Windows, I will also try that 🙂
  15. Hi all, I have another question, this time regarding DDEV on a Mac. After having such problems with performance on my Windows 11 laptop I am considering to switch to a Mac. I have the impression that most of you work on a Mac (?), and would hope that the overall and especially DDEV performance is better there. Regarding my recent performance problems, I could imagine that these are related to the Mutagen file system synchronisation between the Windows file system and DDEV. => Has the filesystem on a Mac also to be synchronized between MacOS and DDEV, or are they using the same file system? If the filesystems also have to be synchronized, then using WSL2 and getting PHPStorm to run within WSL2 would probably be the better option. => Does anyone have experience with DDEV on MacOS regarding the file system synchronisation or does anybody use PHPStorm within WSL2 and could share some insights?
×
×
  • Create New...