Jump to content

adrian

PW-Moderators
  • Posts

    10,902
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. I don't think I have ever needed more than a standard mysql text field. 65,000 bytes is a lot already. Jeez, that's the same as the total RAM of my first computer Type | Maximum length -----------+------------------------------------- TINYTEXT | 255 (2 8−1) bytes TEXT | 65,535 (216−1) bytes = 64 KiB MEDIUMTEXT | 16,777,215 (224−1) bytes = 16 MiB LONGTEXT | 4,294,967,295 (232−1) bytes = 4 GiB
  2. And the mytemplate template definitely contains a field called documents?
  3. @tobaco, I haven't looked into the language issue fully yet, but had a quick look at the role error you are getting. For some reason your cms user doesn't have a role defined in the json file. From what I can tell, it is not possible to save a user in PW without at least having the guest role assigned, but could you please look at that user and let me know the role setup for it? Another role issue I noticed has shown up because you are migrating your entire page tree, which includes the default 404 page. The created_user_id for this page is 3 which is not actually a user. I am going to check with Ryan if there is a reason for this. Regardless, I should be able to implement a workaround for this easily. One nice thing from playing around with your JSON file is that the FieldtypeTextareas field appears to have been imported correctly - I hadn't tested any of the new Profields with Migrator yet, so this is an encouraging start
  4. What do you see in your 1022 folder if you move the exit down to after line 317 and then again after 318? I am assuming there is something in the create_zip function that isn't working on your local install. Maybe it's the ZIPARCHIVE::OVERWRITE?
  5. Try replacing: $users->delete($u); with: $this->users->delete($u); Also, turn on debug mode so you get some error reporting - these should be showing up.
  6. The first error I see is: $this->$users->find It needs to be: $this->users->find EDIT: Sorry, I loaded this thread, then got distracted and was beaten to it
  7. Thanks for the fix Ryan - the noPermisionCheck should come in quite handy in other situations too As for the "it" GET variable. If I go to: http://pwtest.dev/service-pages/?name=about with the following for debugging: print_r($k);echo $_GET['it']; foreach($k as $name) { //if($name=="it") continue; I get: Array ( [0] => it ) <br /> <b>Notice</b>: Undefined index: it in <b>/Users/ajones/Sites/pwtest/site/modules/ServicePages/ServicePages.module</b> on line <b>175</b><br /> Array ( [0] => name ) <br /> <b>Notice</b>: Undefined index: it in <b>/Users/ajones/Sites/pwtest/site/modules/ServicePages/ServicePages.module</b> on line <b>175</b><br /> {"errors":["Field 'it' is not allowed in queries"]} so $_GET['it'] doesn't exist, but it is part of the $k array.
  8. Can you please clear your browser session data and then run an export on your xamp server and after the file has downloaded, reload the page and open up: Debug Mode Tools > Session and look for an entry like this: jsonFilename | /Users/xxxxxx/site/assets/files/1006/data.json Keep in mind the 1006 will be different.
  9. http://validator.w3.org/check?uri=http%3A%2F%2Fanswerhub.com%2Fblog&charset=%28detect+automatically%29&doctype=Inline&group=0 Error #4
  10. Glad to hear it's not Migrator I am running it locally and it works fine. I wonder if it's an issue with: addFile (http://www.php.net//manual/en/ziparchive.addfile.php) What version of php are you running?
  11. Can you please try exporting a page tree that does not include Home as the parent? I think maybe there might be an issue with selecting Home as the parent. It works for me, but just trying to narrow it down. Also, are you running multilanguage page names?
  12. Yep, that is the latest. Does exporting a different parent make any difference to having a data.json file in your zip?
  13. @tobaco, Thanks for the json file. I will take a look at the language/role issues when I have a little more time - sometime early next week. @NooseLadder Can you please make sure you are running the latest version of Migrator - I think the fix I made yesterday should take care of the issues you are having. Although it is surprising to hear that you don't have a data.json file in your exported files.zip - I have never seen that before. Does it make a difference if you choose a different parent page when exporting?
  14. Well how about a separate query like: $locations = $pages->get("/locations/"); foreach($locations->children() as $state) $StatesHTML .= '<option value=".$state->name.'>' . $state->title . '</option>'; } Maybe this is still getting duplicates, but I would think from your page structure, there should only be one Statename for each state, with multiple Location Names children below each Statename
  15. Good point - sorry I didn't really think through your scenario completely I don't think there is a way for unique() to work for you in this case. I am curious how the states are referenced to the locations. Do you have a page field of states that is selected from when defining locations, or are they entered into a text field? If the former, then you already have a list of distinct states to pull from. I feel like this might be a page/template structure question, rather than a need to strip duplicates afterwards, but I think we need more info on how locations are defined to be sure. Once hack you can do is populate a simple array of state names ($state_names) as you iterate through your locations loop and then do: if(!in_array('nevada', $state_names)){ $StatesHTML .= '<option>' . $Location->Location_State . '</option>'; }
  16. Not much more to say really From the docs: $a->unique() Return a new WireArray that is the same as $a but with no duplicate values. So you can get an array of pages using any PW selector and then remove any duplicates using unique()
  17. I am sure teppo will have a log reset button done for you in no time, but you could always use PHPMyAdmin to remove all the rows from the process_changelog database table.
  18. Did you see my updated post with second screenshot showing the profile page in modesta? Maybe there is something weird on Windows?
  19. This is expected behavior for TinyMCE. If you click the HTML button and cut/copy/paste everything in there it will work fine.
  20. You might want to have a look at this alpha module from Soma: https://github.com/somatonic/BlocksContent There is some discussion about it here: https://processwire.com/talk/topic/4189-flexibility-in-page-design/?p=45437 You might want to browse further back in that thread too. One other possibility might be the new PageTable field type which allows for adding multiple content blocks (you can define multiple templates) that can be sorted by the user, so you could easily have a separate Add button for each of your content types - I think this could be pretty effective actually. There isn't any real documentation for PageTable yet, but you can start reading here: https://processwire.com/talk/topic/6417-processwire-profields-table/page-2#entry62890
  21. You shouldn't have to do this unless you are worried about the login screen which will always use the default theme (if available) since the theme is controlled on a per user basis.
  22. What about $Locations->unique(); http://cheatsheet.processwire.com/?filter=unique
  23. Ok, just to follow up. I have fixed the issue with the error when using the "Edit Imported Content" option - stupid oversight on my part when I added a cleanup routine in a recent update. Should be fine now I can't replicate the error around roles so it would be great to have your exported json if possible. I also tried to look at the language page names issue, but when I tried to leave the default name blank I get an error saying that it can't be blank, but I think I must not be understanding this. Could you please outline the steps to set up a site with multi-language page names with a blank default name so I can test this. Thanks again for your feedback with this.
  24. Not very helpful I know, but it's working for me on 2.4.5 - I was running the initial 2.4.5 from a few days ago and just updated to the very latest commit and still working fine.
×
×
  • Create New...