![](http://processwire-forums.s3.us-west-2.amazonaws.com/set_resources_6/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
joe_g
Members-
Posts
367 -
Joined
-
Last visited
Everything posted by joe_g
-
"Continuous integration" of Field and Template changes
joe_g replied to mindplay.dk's topic in General Support
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..? -
"Continuous integration" of Field and Template changes
joe_g replied to mindplay.dk's topic in General Support
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 -
Ah yes, temporarily make a new field. Great, thanks! j
-
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
-
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
-
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
-
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
-
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
-
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>
-
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!
-
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
-
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.
-
Hello! I'm wondering what components best to use to build the following (it's for a semi-extensive application process): - sign up new account - login - a multistep form including uploading multiple files - Say, 5 screens/steps, with save data in between steps (save on 'next' or previous) - possibility to logout and login later and continue filling in the form - preferably with the zurb foundation form-styling Would form builder be good for this? How would be the best way to get about doing a thing like this in PW? Can form builder save state? thanks! J
-
doh! this is how "view" work. Didn't know J
-
Hey hey, Is there an easy way to make a page available like it's published, but only for logged in users? I'm trying to make a preview function. These two doesn't seem to work so well: http://modules.processwire.com/modules/process-preview/ http://modules.processwire.com/modules/process-page-draft/ The only way I can see now is to make a 'hide unless logged in' check box then litter the site with ->hide_unless_loggedin, is there a better way? tx j
-
Thanks! It's 2.4.0 eh.. ops, forgot to finish the title!
-
Hi, I got this error happening sometimes (I only notice it in the logs, and I can't see any problem on the site) 2014-11-21 03:59:00 guest http://subdomain.domain.com,domain.com,www.domain.com/http404/ Error: Exception: Method Page::localUrl does not exist or is not callable in this context (in /home/domain.com/public_html/wire/core/Wire.php line 320) I'm not sure where/how to debug this since I don't know when or where it happens. The error sends an email, othewise I wouldn't have noticed. Is there a way to get a full stack trace for this error somehow? j
-
heyhey, here is something off topic: Are there any MEAN/node devs here? Just a general question, I'm interested in nodejs, but what's holding me back is that to get to the same level of slickness of an admin interface as processwire seems to be very hard work. It seems easy enough in both RoR and Django, for example, but with node, not as easy. Making admin interfaces is such an incredible drag, this is one of the reasons why I love PW. Clients love that slick custom admin they get to work with. Just curious to hear if anyone had any experience with writing an admin interface based on MEAN/node, from a processwire perspective. - CRUD with - relationships (like pages in PW) - users - access levels / groups - access rights - multilingual (very important) I should mention that I'm not looking for any presentation layer (templates/views, etc). Only a way to handle the data (with some custom data model) in a client-friendly way. cheers, J
-
Hi there, Locally I can only be logged in to one PW install at a time. It's becoming a bit cumbersome, since I'm juggling about five different project at a time (all PW installs), so every time i switch project I need to login again. Is there any way to avoid this? thanks!, J
-
I could do this I guess, and then the name will be calculated? $default = wire("languages")->get("default"); $p->title->setLanguageValue($default, 'blablabla'); thanks, j
-
Hello, this works: $user->language = wire("languages")->get("default"); $p = new Page(); $p->parent = $pages->get('/things'); $p->template = $templates->get('mytemplate'); $p->title = 'blablabla'; $p->save(); ..but this doesn't (in pw2.4): $user->language = wire("languages")->get("english"); $p = new Page(); $p->parent = $pages->get('/things'); $p->template = $templates->get('mytemplate'); $p->title = 'blablabla'; $p->save(); i get Can't save page 0: /en/things/: It has an empty 'name' field any ideas how to get around this? J
-
Cannot redeclare class FieldtypeTextLanguage after copying site
joe_g replied to joe_g's topic in General Support
I solved it like this: https://processwire.com/talk/topic/2598-fatal-error-cannot-redeclare-class-sessionloginthrottle-on-update/ I deleted the /wire folder, then pasted in the /wire folder from a different (totally unrelated) project the difference in my case was that it was happening locally -
Cannot redeclare class FieldtypeTextLanguage after copying site
joe_g replied to joe_g's topic in General Support
thanks, deleted sessions on both sites, no effect tho j -
Hello, I get this error after copying a v2.4 site (from /xx to /yy) Somehow the copy have a reference to the old location. So on the new site (/yy) i get: Fatal error: Cannot redeclare class FieldtypeTextLanguage in /Applications/MAMP/htdocs/xx/wire/modules/LanguageSupport/FieldtypeTextLanguage.module on line 17 This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged. What can I do to make the new copy (/yy) forget about the old location? - I tried deleting the module cache. - .htaccess is identical in both cases, there is no reference to /xx - $config->httpHosts = array('localhost:8888', 'localhost'); // also identical - deleted the sessions on both /xx and /yy
-
I tried looping through the repeater values and publishing them for all languages, but no luck so far: (site is 2.4) $pages->setOutputFormatting(false); $pps = $pages->find('has_parent=/processwire/repeaters/for-field-116/'); foreach($pps as $p) { foreach($languages as $lang) { if($lang->isDefault()) continue; $p->set("status$lang", 1); echo "set status$lang" . $p->title . ' <br>'; $p->save(); } } die;