Jump to content

adrian

PW-Moderators
  • Posts

    11,097
  • Joined

  • Last visited

  • Days Won

    365

Everything posted by adrian

  1. I am thinking this might be a Windows vs Unix slash/path issue, but I am not exactly sure where. Does xammp translate forward slashes to back slashes for disk paths - is that why the results you just showed have forward slashes? But then if that was the problem then you'd think it would also affect the template files and images in the zip as well. Maybe it's time I set up an xampp installation on my Windows VM. Please grab the latest version from Github and try adding the following after line 2120: error_log('current:'.$file.'|new:'.pathinfo($file, PATHINFO_BASENAME)); and let me know what ends up in your log. In other news, the latest version should now solve the role issue that @tobaco was having with system created pages and also it should now work properly when attempting to migrate a site with the Home page set as the parent. You can now import Home into Home and it should work properly, allowing full migration of an entire site's page tree - at least something productive came of my efforts today
  2. Sorry to hear that - can you please try this after line 318: print_r($allfiles);exit;
  3. @tobaco - thanks for the feedback - obviously I need to look further into users/roles migrations. Your exported json is showing that the home page is created by a user named "cms" with no role. Looking at the created_users_id for the home page, this makes sense. I'll try to work on this shortly, along with the rest of the multi-language issues. @NooseLadder - thanks for that - I have pushed an update which I hope will fix things for you - can you please let me know how it goes.
  4. Not sure but is that selector in a showIf dependency for one of the fields in the page's template?
  5. Is the new page being created ok? I see that you are not defining a title for the page.
  6. 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
  7. And the mytemplate template definitely contains a field called documents?
  8. @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
  9. 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?
  10. 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.
  11. 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
  12. 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.
  13. 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.
  14. http://validator.w3.org/check?uri=http%3A%2F%2Fanswerhub.com%2Fblog&charset=%28detect+automatically%29&doctype=Inline&group=0 Error #4
  15. 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?
  16. 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?
  17. Yep, that is the latest. Does exporting a different parent make any difference to having a data.json file in your zip?
  18. @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?
  19. 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
  20. 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>'; }
  21. 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()
  22. 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.
  23. Did you see my updated post with second screenshot showing the profile page in modesta? Maybe there is something weird on Windows?
  24. This is expected behavior for TinyMCE. If you click the HTML button and cut/copy/paste everything in there it will work fine.
  25. Here's my Profile page:
×
×
  • Create New...