-
Posts
4,077 -
Joined
-
Last visited
-
Days Won
87
Everything posted by horst
-
Hahaha! (That's funny)
- 9 replies
-
- marketing
- social media
-
(and 1 more)
Tagged with:
-
There is also an example layer class on SO that provides none blocking concurent session writes: http://stackoverflow.com/questions/10046570/php-save-session-when-using-session-write-close/27993746#27993746 But you need to implement this yourself before you start the long running tasks and switch back to PWs regular behave after you have finished them. You can use everything you want to handle sessions with http://php.net/manual/en/function.session-set-save-handler.php.
-
Hi @jon9china, hhm, yes, sorry. The httpHosts array needs to be changed to (at least) include the new hostname too. (Or is set to only hold this domain name). It is for security reasons, but this isn't the reason for the 500. Regarding the 500 internal error: You need to check write permissions for folders and files under site/assets/. (Including the assets folder itself.) PW needs write access to create / delete subfolders and files. During installation you have defined chmod values for files and folders for that, it is noted in your site/config file. (e.g. 0755 and 0644, or 0777 and 0666). Check if files and folders in the subdomain are assigned that way. Also, if the 500 is gone and you can access the admin but get some errors there, you should go to -> modules -> refresh (search for new). PW uses cached informations for all modules (installed and uninstalled ones), including pathes. This needs to be recreated, too, if it isn't automatically. Please report back when all is working ok, or if there is anything other that doesn't fit. PS: here is little troubleshooting guide from Nico, regarding regular installation processes: Doesn't fit in your case, as your orig site is already running, but maybe is nice to have bookmarked for future installations on (foreign) hosts.(?)
-
In short: nearly nothing more! If you have an exact copy of your origin Database as second DB you only need to change the credentials in site/config.php to point to the dev-DB. Besides that, you should copy the index.php, .htaccess and complete wire and site folders to the dev.domain. That's it!
-
Another approach can be to setup a dev-subdomain on your online hosting provider and use an editor that provides editing of those files directly via ftp(, sftp, ftpes) behind the scenes. This has been discussed sometimes here in the forums too. Good google searches for that can be: site:processwire.com/talk -"Viewing Profile" mac editor ftp It depends on your hosting account, if there are resources for: 1 additional DB and the possibility to create subdomains, e.g. a dev.example.com besides the www.example.com.
-
@LostKobrakai: thanks for the link and clarification! @rick: hmm, yes, - I forgot to mention that I'm old-schooled.
- 11 replies
-
- flexibility
- concept
-
(and 1 more)
Tagged with:
-
It would have been nice if you have pointed to the relevant slides of matrix. Or do you really believe people want to look 1 hour video to be able to understand your question? So, cannot say much to matrix, but a few things came to my mind: I use split screen since ever, via two browser windows! Have a look to the blueVR siteprofile. It seems to handle output positioning of parts very nicely. Don't know if this is something in regard of the (for me) unknown matrix, but, maybe it gives you another point of view.
- 11 replies
-
- 1
-
- flexibility
- concept
-
(and 1 more)
Tagged with:
-
@pwired: You should have a look to the SPEX module, it has all what you are looking for onboard allready.
-
One more Button, for: OpCache status If OpCache is enabled on a site, it includes a new button and add an admin page for viewing the opcache status. The script for showing this is taken from, and credits go to: Rasmus Lerdorfs. See github repo: https://github.com/rlerdorf/opcache-status
-
@Pierre-Luc, if possible, you should update the compatibilty list of that module, - it only shows PW 2.4. All your other modules are up to date in this regard and shows versions inkl. PW 2.7
-
Bootstrap ProcessWire - fields not working like expected
horst replied to Henrik's topic in General Support
Hi Henrik, I'm not sure and in a hurry, but regarding 1), it can have to do with outputformating state. Please try and compare both possibilities explicitly set: $nlPage = $wire->pages->get("/newsletter/"); $newText_with_outputformatting = $nlPage->of(true)->text_without_p_tags; $newText_without_outputformatting = $nlPage->of(false)->text_without_p_tags; My guess is, that without setting it to true, in bootstraped mode it is set to false, = unformatted. This way no textformatter is supplied. Whereas the Template-Scope is the only scope where outputformatting is set to true automatically. Everywhere else, you have to explicitly check or set it. Regarding 2: you can define what you want to have as result, array or singleimage i the settings (advanced settings?) of the image field. But this also is only supplied if the outputformatting is ON. If you are in bootstrap mode, and access to it, you get unformatted return, what always is an array for all fields that can handle multiple items. Please refer to the docs for multiples and outputformatting to get more information. Once you have read it, you will get how it works, and that it all makes sense. -
A bit offTopic, but since a few weeks I know that there is this module to Backup DBs. So, I don't want scheduled Backups for Sites that in development state, but I want to have many backups in little steps. Therefore I added this to my ready.php after I installed kixes module: $wire->addHookBefore("Session::logout", function(HookEvent $event) { if(!wire('modules')->isInstalled('CronjobDatabaseBackup')) return; if(!wire('user')->hasPermission('db-backup')) return; // execute a cronBackup $cdb = wire('modules')->get('CronjobDatabaseBackup'); $e = new HookEvent(); $cdb->cronBackup($e); return; }); I setup the module CronjobDatabaseBackup with: BackupCycleInterval = never; a high number of Maximum Number of Backupfiles; and a name format with timestamp, like: #__%Y-m-d_H-i% This way, everytime when a defined user logs out, a backup is made.
-
Don't really understand the second part. What I would say is: it doesn't make sense if the children of a Fieldset (what is a wrapper or a parent container) doesn't inherit the parents state. (<- does this make sense?) (Sometimes it isn't easy if two none native english people talk / write in english)
-
You can securely drop all rows from table caches. They will be recreated on next request. Please tell if this changes the behave or not.
-
I vote for "bug"! IMO this doesn't make sense.
-
Is this the only superuser you have, or do you have multiple superusers?
-
Added another little tool to the box that I sometimes use to detect best breakpoints for mediaqueries. A little Javascriptbox that displays the dimensions of body and a configurable custom container (by ID). What dimensions are shown, offsetWidth, ClientWidth, ScrollWidth, is dynamically configurable in the Top of the JSbox: To enable / disable it, select or drop the button in the config page, and, optionally, type in the id of a custom container.
-
Have seen that it was mentioned in last ProcessWire Weekly. (sighh, have hurried up with it) I have tested it with PW versions 2.3, 2.4, 2.5, 2.6, 2.7 and with PHP 5.3 and 5.4. It works good from PW 2.4+ up! With PW 2.3, the Javascript Color Picker doesn't function. But 2.3 is really old and if someone has maintained a site until now without ALIF, he will do it fine in future too. Only thing I want to know is: in wich PW version was "showIf" introduced to show / hide Inputfields in the admin? Would be nice if someone can point me to that. So, it is ready for the masses now!
-
@bora: with the WireMailSmtp you can use one To and the rest in a CC field. But you also can have a look to the wiremail core class and how you can extend it, and build a small extension that does what you want. EDIT: btw, thats a friendly looking new avatar, you have!
-
It's now on Github: https://github.com/horst-n/AdminLinksInFrontend After aproval in the modules directory, I will update the post here. Please, re-read the first post. It is updated with the release announcement and a more detailed explanation of all features.
-
You can use escaped doublequotes in either of the versions in your code, than it should work in PW 2.7 too: echo "More info on <a href=\"{$page->bfd_url_wiki}\" target='new'><b>Wikipedia</b></a>"; change href='...' to href=\"...\" in your template code, than it will work in every situation, regardles if you have escaped or unescaped single quotes in your URLs.
-
Sorry, but I really cannot follow what you are asking for. As I could understand from reading here, there was a change in PW, related to security, to not support single and double quotes in URLs per default anymore, as it was done in the past. That's a good thing, I think. And there is an option to (re)activate the old behaviour, for those, who need it. Conclusion: new behaviour + old behaviour ? what more do you need ? or what is the part that I do not understand here ? Also please refer to the according RFC 3986, where is described which characters are allowed to be present unescaped in an URL. Quotes and doublequotes are not in, or I may have overlooked it? Also the example you have posted is wrong coded and cannot have worked before too: You cannot wrap single quotes around an URL if the URL itself contains (unescaped) single quotes! Please, first fix your syntax and maybe, second, try to use more RFC conform URLs. (I know that browsers also work with malformed URLs, but since you now know that this is malformed, you shouldn't use it anymore).
-
I know this site too. In the past it has loadded "normally" fast. There must have definetly something changed, ServerSoftware or SiteCode. The initial request can take up to 10 seconds. Here is the culprit. Do the server provides PHP as included Apache-Module, or as fast-cgi?
-
Can you 100% ensure that you are not fetching ProCache files?? You can go the hard way and comment out the complete ProCache section in htaccess, rename the ProCache root directories manually, additionally to (only) disabling PC.
-
ALIF - Admin Links In Frontend EDIT: latest version update with PHP 8 fixes on 05. Nov 2023 (!) The version now is 1.1.9 (!) This module combines some of the admin links that we want to use on the frontpages sometimes. It is a comfortable and easy way to do so. After you have installed and configured the module, you can inject the links into the frontpage with code like this in a template file: echo $modules->isInstalled('AdminLinksInFrontend') ? $modules->get('AdminLinksInFrontend')->render() : ''; . Credits: The comfortable Javascript Color Picker in the Configpage comes from Jan Odvarko (http://jscolor.com). Many thanks for this! * Toolbar The toolbar can be positioned by css values for top/bottom and left/right. It can expand in vertical or horizontal direction. The buttons are links to the PW admin, for logout, or for editing the page in admin, or informational ones. All settings, including the colors, can be defined in the modules config page. This is available for all PW versions from PW 2.3 up to now. Depending on how you configure this part, it can be used for authors and editors too, maybe. * Import / Export Settings It has the possibility to export and import its settings via two textarea fields. When importing settings, you get a second screen where you can select which settings you want to import. * One-click User Account Switcher For PW versions 2.6.8+, there is one really nice function available, that I use when developing / testing sites with different user / roles. A fast User-Account-Switcher that lets you view the same page from different user accounts with only one click. To enter this mode, you need to login as a superuser one time, and the feature needs to be enabled in the module of course. After that, you can log out, login with different user roles, etc. At least the toolbar buttons for the User-Account-Switcher will stay visible for you. This is session based. There is also an extra button with a trash can and the text "Session", that helps you to leave this mode once you are finished. As you can see in the screenshot, after clicking "guest", I was logged out, but a regular login button, a warning for debug mode and my three defined buttons for user accounts are available. When clicking another user button I login with this account. Very handy. ATTENTION! The use of the One-click User Account Switcher is mainly intended for dev sites, not for public sites! You should be aware that there is a huge security risc when using this feature on public reachable sites! We completly leave ProcessWires comfort zone in regard of security, - and the only thing between your site and potentially hackattacks is this module. (Oh mom, - what have I done?) PW 2.6.8+ has a comfortable function for admin tasks, that let us log into different user accounts via API without using passwords. This module uses this function! All data that is needed during a User Account Switcher session is stored in the session data on the server. So, if someone steel your session cookie, there is potentially risc that he can login as a superuser, depending of the user account buttons you have in your admin links collection! To prevent SessionHijacking, the module can be bound to a single IP address, it uses a fingerprint depending of IP(s) and UserAgent string. And you need to define a max time to live in minutes between 2 and 60, a User Account Switcher session may run. A User Account Switcher session only can be initialized by a Superuser who also explicitly has set a permission called 'alif-user-account-switcher', what is defined by the module, when installing it. So, the prefered way to use this module is, to enable and use the User Account Switcher while the site is unpublic, and before it goes public, remove the permission from the superuser role. This way, you can use its menu function, but not the UAS anymore. On a sidenote, for those rare cases where multiple superusers simultaneous developing on a site and want to use the ALIF, but the UAS should be used only by one, you can leave the 'alif-user-account-switcher' permission removed from the superuser role, but need to assign the role 'alif-superuser' to the single user account. This way, only that single superuser has the permission for UAS, whereas all other superusers doesn't have it. . . * The Configpage * Online demo I have pasted it into this old site and enabled it to be present every time (when the site is in demo mode only!). So, it is an earlier state, but the switcher is functional there: http://pwlaf.biriba.de/dbinfo/ * Download From our modules directory or from github repo
- 32 replies
-
- 31