Jump to content

joe_g

Members
  • Posts

    248
  • Joined

  • Last visited

Everything posted by joe_g

  1. I tried to upgrade from 2.5.3 to 3.0.42, but after upgrading I got an empty pages page (the page tree in the backend is gone:) in the console there is an error: ) Everything else seems to work - direct link to the individual pages works fine, so i can edit them one by one. tx!
  2. Hi there, Is there a way to avoid text fields getting trimmed? I'd like the possibility to start with two blank returns in textfield. Odd request, I know...
  3. Hello, Is there a way to regenerate the name from the title in the API, like: $myPage->regenerateName(); $myPage->save(); or similar? I'm looking to batch rename a lot of urls, but only once.
  4. Hello, Has anyone worked with the twitter oEmbed to get a single tweet embed-code? I was hoping there was a plugin for this, but it doesn't seem to be one. Ideally I'd like to fill in the tweet id or address, and the rest is filled in. I'm trying to avoid having the client pasting the embed code themselves (can go wrong easier). To write a plugin for this is a bit over my head at the moment. I would need to do caching and things like that not to affect the page load too much. But maybe someone has already done this one way or another? thanks!
  5. Hi there, I'm using 2.7.3 dev (Using dev due to this bug https://processwire.com/talk/topic/13107-cant-save-changes-on-template-pw-272/) 1. If the editor crop an image in the backend and do save-replace of the original, the cached version (created by ->size()) still shows a thumbnail from the previous/original version. Wouldn't it be more logical if all cached thumbnails are deleted if you alter the original? 2. I managed to delete some variations, but some refuses to get deleted. It says deleted in the green field on top, but it's still there. best, Joel
  6. Yes, that worked - thank you! I'll await next stable and update then again, but for now dev seems to work fine J
  7. Hi, thanks - but no errors in the log. I'm a bit reluctant to upgrade to dev on production, anything else i could do or some info that could help? thanks again, J
  8. Hi, When I try to make a change on a (any) template on my prod server (php 7) I get the green message "Session: Saved template: article", but nothing is saved. Adding or removing a field is the same, no change on save. Same behaviour in safari and chrome. I tried clearing sessions on the server, all cookies in the browser. Editing pages works fine, only editing templates is not possible. I can assign a field to a template from the field editor, but not from the template thanks J
  9. Hi everyone, How can I allow sort/move without allowing edit permission on the parent? Been searching around for this and found no solution. It's something I run into in almost every project. thanks!
  10. I ran into a bug with the latest stable version of PW (2.6.1) and site profile exporter: I'm trying to create a distributable installation using the export profile, but in the latest version after installing selecting my exported profile the modules aren't installed. They are all there, in the modules folder. If I press "refresh" in the modules menu, all is fine; they all appear and become installed immediately. I'm getting the same result exporting a profile from an older version of PW (2.5.22 dev). Importing to another old version works fine, so I'm guessing the problem lies with the importing in 2.6.1. Ie. 2.5.22 dev -> 2.5.22 dev = fine 2.5.22 dev -> 2.6.1 = needs refresh 2.6.1 -> 2.6.1 = needs refresh So the problem is with installing with an already-exported site profile, not so much the site export.
  11. Hello, is there a way I can copy a template via the API similar to how it's done in the backend, copying fields and all? thanks j
  12. Hi there, I found something that kept me busy for a while. Not sure if it's a bug exactly, maybe I'm missing some naming conventions. But if the form field has a dash "-" in it, wireupload fails silently (it doesn't get populated, I guess it doesn't recognise the field) I change my form field from form-files to formfiles and then it worked
  13. I understand, but to avoid all edge cases and have a stable solution already today — I could do this hand scripted version? Then, since I would test each migration locally I would be sure that it's working as it should before doing any migration on another server..?
  14. EDIT, seems like the answer to my question is yes: https://github.com/jeanrajotte/upgradewire ----- Hi there, Slight newbie question about continuous integration: Sorry if this has been covered already - lengthy thread! Isn't it the case that if I would use the API to add/edit my fields and templates, (Everything can be done from the API, I guess?) I could script and automate any data model migration? Not using the GUI seems like a small price to pay for being able to do something similar to "migrate up" and have the server apply the latest data model changes? I could, already today, have a control file that look like something like: Current version: 2 version 1 migrate up: add field X migrate down: remove field X version 2: migrate up: rename field X to Y migrate down: rename field Y to X The import / export json thing is super awesome, but it's not for automated migration, I guess? Would this work? What do you think about it? J
  15. Ah yes, temporarily make a new field. Great, thanks! j
  16. Thank you, I wasn't 100% sure if adding my own site profile, and re-zip it, would equal a "verbatim copy", but I guess that's a yes, then. I'll be providing other means for download as well, (for developers) – but for some it could be easier with one single zip
  17. Hi there, I'm working on a hobby project; It's a easy portfolio maker for artists. With the site profiler it's easy to create a nice installable zip. My question is this: Is it OK to repackage PW in a new zip with a custom site profile, (license wise) - and then offer it as a download on my own site? I figure it would be according to gpl2, but i'd like to make sure. thanks, J
  18. thanks, but to make things more complicated i only need to do it sometimes, not on all items... So if possibly I'd want to loop over the items. not sure what happened with the double post, but thanks for deleting it J
  19. Hi there, it seems I have to choose one field to be the title field for the RSS module, is there a way I can customize this. Instead of: $rss->itemTitleField = 'title'; $rss->render(); I'd like to do something like foreach($myPages as $p) { $ii = $i->addNewItem(); $ii->title = $p->title . $p->author; } in other words, put both title and author in the title for the RSS would that be possible somehow? tx - j
  20. ooh, I found the error – it's really embarrassing. But I wouldn't have found it without your help. Because the error appeared after my code, I was convinced it had to with the cms rather my stuff. Anyway, what I did was the rookie mistake: if($page->template->name='basicpage') { instead of if($page->template->name=='basicpage') { many many thanks J
  21. The error I get when trying to re-add search is a wall of red text: There must be some inconsistency between the templates listed in the backend and what's really stored in the DB somehow TemplateFile: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'search' for key 'name'<pre>#0 /Applications/MAMP/htdocs/website/wire/core/WireSaveableItems.php(215): PDOStatement->execute() #1 /Applications/MAMP/htdocs/website/wire/core/WireSaveableItemsLookup.php(137): WireSaveableItems->___save(Object(Fieldgroup)) #2 /Applications/MAMP/htdocs/website/wire/core/Fieldgroups.php(216): WireSaveableItemsLookup->___save(Object(Fieldgroup)) #3 [internal function]: Fieldgroups->___save(Object(Fieldgroup)) #4 /Applications/MAMP/htdocs/website/wire/core/Wire.php(389): call_user_func_array(Array, Array) #5 /Applications/MAMP/htdocs/website/wire/core/Wire.php(344): Wire->runHooks('save', Array) #6 /Applications/MAMP/htdocs/website/wire/core/Fieldgroup.php(318): Wire->__call('save', Array) #7 /Applications/MAMP/htdocs/website/wire/core/Fieldgroup.php(318): Fieldgroups->save(Object(Fieldgroup)) #8 /Applications/MAMP/htdocs/website/wire/modules/Process/ProcessTemplate/ProcessTemplate.module(439): Fieldgroup->save() #9 [internal function]: ProcessTemplate->___executeAdd() #10 /Applications/MAMP/htdocs/website/wire/core/Wire.php(389): call_user_func_array(Array, Array) #11 /Applications/MAMP/htdocs/website/wire/core/Wire.php(344): Wire->runHooks('executeAdd', Array) #12 /Applications/MAMP/htdocs/website/wire/core/ProcessController.php(204): Wire->__call('executeAdd', Array) #13 /Applications/MAMP/htdocs/website/wire/core/ProcessController.php(204): ProcessTemplate->executeAdd() #14 [internal function]: ProcessController->___execute() #15 /Applications/MAMP/htdocs/website/wire/core/Wire.php(389): call_user_func_array(Array, Array) #16 /Applications/MAMP/htdocs/website/wire/core/Wire.php(344): Wire->runHooks('execute', Array) #17 /Applications/MAMP/htdocs/website/wire/core/admin.php(85): Wire->__call('execute', Array) #18 /Applications/MAMP/htdocs/website/wire/core/admin.php(85): ProcessController->execute() #19 /Applications/MAMP/htdocs/website/site/modules/AdminTheme/AdminThemeBeurs/controller.php(13): require('/Applications/M...') #20 /Applications/MAMP/htdocs/website/site/templates/admin.php(54): require('/Applications/M...') #21 /Applications/MAMP/htdocs/website/wire/core/TemplateFile.php(169): require('/Applications/M...') #22 [internal function]: TemplateFile->___render() #23 /Applications/MAMP/htdocs/website/wire/core/Wire.php(389): call_user_func_array(Array, Array) #24 /Applications/MAMP/htdocs/website/wire/core/Wire.php(344): Wire->runHooks('render', Array) #25 /Applications/MAMP/htdocs/website/wire/modules/PageRender.module(356): Wire->__call('render', Array) #26 /Applications/MAMP/htdocs/website/wire/modules/PageRender.module(356): TemplateFile->render() #27 [internal function]: PageRender->___renderPage(Object(HookEvent)) #28 /Applications/MAMP/htdocs/website/wire/core/Wire.php(389): call_user_func_array(Array, Array) #29 /Applications/MAMP/htdocs/website/wire/core/Wire.php(344): Wire->runHooks('renderPage', Array) #30 /Applications/MAMP/htdocs/website/wire/core/Wire.php(411): Wire->__call('renderPage', Array) #31 /Applications/MAMP/htdocs/website/wire/core/Wire.php(411): PageRender->renderPage(Object(HookEvent)) #32 /Applications/MAMP/htdocs/website/wire/core/Wire.php(344): Wire->runHooks('render', Array) #33 /Applications/MAMP/htdocs/website/wire/modules/Process/ProcessPageView.module(171): Wire->__call('render', Array) #34 /Applications/MAMP/htdocs/website/wire/modules/Process/ProcessPageView.module(171): Page->render() #35 [internal function]: ProcessPageView->___execute(true) #36 /Applications/MAMP/htdocs/website/wire/core/Wire.php(389): call_user_func_array(Array, Array) #37 /Applications/MAMP/htdocs/website/wire/core/Wire.php(344): Wire->runHooks('execute', Array) #38 /Applications/MAMP/htdocs/website/index.php(214): Wire->__call('execute', Array) #39 /Applications/MAMP/htdocs/website/index.php(214): ProcessPageView->execute(true) #40 {main}</pre>
  22. Yes, thank you. It's a good hint, I'm currently not really doing anything with the template basicpage. The error is unrelated to the template I'm working on, as far as I can tell If I rename basicpage to basicpage2, I suddenly have both basicpage and basicpage2. Then, strangeness: After that the 'new' basicpage is totally empty (even no title) with the fieldgroup from the template formerly-known-as search. I deleted the new mysterious basicpage and renamed basicpage2. Search has become basicpage, but after deleting both basicpage and search I cannot add search again - the name is taken but not listed in the templates list confused!
  23. Hello again, I'm a bit stuck on this issue. It seems to me it's something behind the scenes going on. 1. I edit my-template.php (Like, comment or uncomment some line of php) 2. Viewing the page that is using my-template I get the above error added after all regular markup 3. I hit save on the my-template page 4. error is gone 5. If i change anything in my-template.php error is back ..repeat The error complains about 'basicpage' which is a template that has nothing to do with the page I'm working on at the moment. any hints or guesses would me most helpful, (PW version 2.5.3) thanks J
  24. HI there, I'm getting this error on the bottom of a page. If I save the page in the backend, it's gone – only to be back again after clicking around in the site. I'm not sure how to start debugging it, since I can't see where it comes from really. In the source it appears after the last DIV, so its after all page code is executed. It only seem to happen locally, and not on the live site, luckily. it happens on both staging and local. This same error has been appearing in various pages, but usually it goes away after saving, but finally it started happening repeatedly on one of the pages. I'm looking for clues on where this might come from, or how to find out. Thanks, J Error: Exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'basicpage' for key 'name' (in /Applications/MAMP/htdocs/website/wire/core/WireSaveableItems.php line 210) #0 /Applications/MAMP/htdocs/website/wire/core/WireSaveableItems.php(210): PDOStatement->execute() #1 /Applications/MAMP/htdocs/website/wire/core/Templates.php(159): WireSaveableItems->___save(Object(Template)) #2 [internal function]: Templates->___save(Object(Template)) #3 /Applications/MAMP/htdocs/website/wire/core/Wire.php(389): call_user_func_array(Array, Array) #4 /Applications/MAMP/htdocs/website/wire/core/Wire.php(344): Wire->runHooks('save', Array) #5 /Applications/MAMP/htdocs/website/wire/core/Template.php(509): Wire->__call('save', Array) #6 /Applications/MAMP/htdocs/website/wire/core/Template.php(509): Templates->save(Object(Template)) #7 /Applications/MAMP/htdocs/website/wire/core/Template.php(554): Template->save() #8 /Applications/MAMP/htdocs/website/wire/core/Wire.php(411): Template->hookFin This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged.
×
×
  • Create New...