-
Posts
4,956 -
Joined
-
Last visited
-
Days Won
100
Everything posted by LostKobrakai
-
There's always the possibility for bugs when updating any software. That why you should always update on a staging/dev environment before doing it in production. I've not experienced any reworks in ProcessWire which would've broken anything without at least incorporating a fallback, so modules should at least work for a whole mayor release cycle. In the modules directory there's a field indicating compatible versions for each module. Regarding the savety issue. ProcessWire does even provide lots of functions to make it easier for users to secure their code (CSRF, session fingerprints, sanitizers) and like mentioned above already, there are currently no known security issues with ProcessWire.
-
It's not suggested to change any paths, but you can use all the config variables here http://cheatsheet.processwire.com/#config (the url ones) to make the urls for template files more descriptive. Regarding the file fields: You'll not have the need to write those urls, as these are dynamic anyway. Just use the api to get the urls: $page->files->first()->url;
-
The sort column isn't explicitly set by the module. It's added by FieldtypeMulti::getDatabaseSchema(), which is a parent class of the event fieldtype.
-
I think he's talking about FieldtypeEvent the kinda example for building own fieldtypes.
-
This is abstracted in the functions sleepValue() and wakeupValue(). You don't need to write own sql statements.
-
I did exactly that and it's working for me. Could you try to reproduce it in a blank installation by yourself and export it as site profile (http://modules.processwire.com/modules/process-export-profile/)? This way we can eliminate modules and such things from interfering.
- 20 replies
-
- 1
-
I do always start from a blank state as I'm not using any frameworks consistently throughout multiple frameworks. But siteprofiles are an easy way to save an own baseline, which can be installed by pw, so no copy pasting and replacing things in the database by hand.
-
Even on the master branch and with an image field I can't reproduce it. I can add fields to the repeater and have no problems updating previously created repeater items. Any errors in the javascript console regarding the image upload? What modules do you have installed?
- 20 replies
-
I just tested this on a fresh install and can't seem to reproduce it. At least not without an image field. Which version are you using? Do you get any errors (php or js)?
- 20 replies
-
It's like it's mentioned in the error message. There's already an entry with the primary key 41-0 in any of your tables and some code is trying to save another entry with this primary key to this exact same table. For me this error was most of the time caused by (own) modules, which did stuff they weren't supposed to do. But basically you could also just search your site folder for "->save(" as this is the part which will result in the error.
-
Yeah, it does append .php if no extentions is given.
-
I don't know what exactly you mean by "current" but you can add methods to each class: http://processwire.com/api/hooks/#add_new_method Maybe you can just use a parameter to determine what should be executed. Edit: Thinking a little more about this. What about this. function myHookFunction($event){ if($event->object->name !== "YOUR_FIELD") return; }
-
Could I control the number of level of creation of child page ?
LostKobrakai replied to adrianmak's topic in Getting Started
1. Make a module like this: https://processwire-recipes.com/recipes/extending-page-save-process/ 2. Use this to move pages: $level_nesting = count($page->parents); if($level_nesting > 1 && $level_nesting > $deepest_nesting){ // $deepest_nesting should be 2 in your case // Move the page one level higher // -2 because of eq counting from 0 and moving one level up $page->parent = $page->parents->eq($level_nesting - 2); } 3. Make this aware of users / roles or whatever you need. 4. (opt.) Leave a notice for the user about what has been done. Edit: small improvement by adding "$level_nesting > 1" Edit 2: Use only the family settings for templates as long as you don't need nesting of the same template.- 1 reply
-
- 3
-
Admin themes where changed to be modules just for the fact, that you do not need to copy stuff from the wire folder. You can just copy the default theme to your site/modules/ folder, rename it and change anything you want. It's not supposed to work like you did it.
-
It's an error that prevents saving of data to the database with the same unique field, e.g. same id. So it's most likely a pagefield or something else which is multi value. Also check your modules if they could be the issue.
-
I think the screenshot won't help anyone debug this. More important would be: which ProcessWire version? any errors javascript and/or php errors? anything in the logs? Also it should not be necessary to copy templates-admin/. Admin Themes should be modules by now.
-
My domain provider just celebrates it's 15th anniversary by providing prices via a game and look what I've managed to win Now I just need to find a purpose for it. If people want to participate in the game, too: https://15.gandi.net/ (Only for customers)
-
Update "How-To Install or Uninstall Modules"
LostKobrakai replied to Richard Jedlička's topic in Getting Started
If you would provide a proposal this will find it's way into the website. The people managing the page are all busy, especially Ryan, so help is always welcome. -
GPL states that you can reuse any part of ProcessWire for free as long as you're including the license, link to it and you're not charging for it. As your module does not work without ProcessWire itself (not standalone) the part of providing the license text seems to be not that important, as it's in the core installation. With this being said, everything which is not a copy of something in the core is more or less your work / composed by you using the available tools. As a module is always something new to the code the core provides (if not it's not worth publishing) there shouldn't be a problem with copies. For your work you're free to choose any license you want.
-
That's only half the truth. It's true that content duplication is bad for seo, but using the meta canonical tag in the head does prevent this. You can have as much entry points to content, only the canonical url in the meta tag needs to be the same on all of them. A redirection is not necessary. As for "relevant keywords". Keywords is the meta tag least important for seo. Google doesn't even evaluate them anymore.
-
This issue has come up often in the last time. Is this supposed to be that way?
-
This thing is supposed to be the ghost element while drag-and-droping a tag. Congrats jQuery UI... I'll see if I can namespace this thing somehow. Edit: it's fixed for the dev branch. Will push it to master as soon as I've included a defaultAdminTheme.css as well.
-
Admin side page field - autoselect all the selectable pages
LostKobrakai replied to Vineet Sawant's topic in Getting Started
Have a look at this: https://processwire-recipes.com/recipes/extending-page-save-process/. With such a module you can check if the saved page is of your special template and if if has an id (already in the database). If so add it to your pagefield. -
Is it possible to over ride Admin Theme?
LostKobrakai replied to chandiniverma's topic in Getting Started
To make the Reno theme the default use this in /site/config.php: /** * Default admin theme * * Module name of default admin theme for guest and users that haven't already selected one * * Core options include: **AdminThemeDefault** or **AdminThemeReno**. * Additional options will depend on what other 3rd party AdminTheme modules you have installed. * * @var string * */ $config->defaultAdminTheme = 'AdminThemeReno'; Read this on the option to have multiple copies of a module: http://processwire.com/blog/posts/processwire-core-updates-2.5.14/ -
I'm on the same page as teppo. I'd much rather see something like a repeater where one selects roles (asm select), templates / pages and limits them with the checkboxes you're using. Maybe one could use a global permission which enables the role to be selectable and so that other devs can notice that this is managed by the module and not by the traditional permission system. OT: Sound quite like the dynamic roles module. Never really used it and it's quite silent about it here in the forum.