-
Posts
711 -
Joined
-
Last visited
-
Days Won
6
Everything posted by matjazp
-
I tested with <?php $step = 1; while(TRUE) { $chunk = str_repeat('0123456789', 128*1024*$step++); print 'Memory usage: '. round(memory_get_usage()/(1024*1024)) . 'M<br />'; unset($chunk); } ?> It goes over 400 MB (in task manager, i'm running PW on IIS, no problem so far) before script times out.
-
Yes, I have deleted images from previous error (assets/pageid directory is empty). memory_limit = -1 was already set before upgrade.
-
Thx. I changed $faktor form 2.5 to 2.0 in wire\ImageSizer.php but error is still present.
-
When adding pictures to images field, i get the error "not enough memory to load/resize". It was working fine on 2.4.0, now after upgrade to 2.5.4 error occurs. File size or picture dimension is not relevant. Picture is uploaded, thumbnail is created, but the size of thumbnail is 1 kb and can not be opened with any picture viewer.
-
Error is not presenting anywhere, as far as I can see. Debug mode was on already when the upgrade took place. errors.txt shows: 2014-10-13 05:57:04 guest http://mysite/processwire/login/ SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pwferi.caches' doesn't exist (WireCache) 2014-10-13 05:57:04 guest http://mysite/processwire/login/ SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pwferi.caches' doesn't exist (WireCache) 2014-10-13 05:57:25 user? page? Warning: there appear to be two copies of module "InputfieldCKEditor" on the file system. Please remove the one in /site/modules/ unless you need them both present for some reason. (WireLog) 2014-10-13 05:57:25 user? page? Warning: there appear to be two copies of module "InputfieldCKEditor" on the file system. Please remove the one in /site/modules/ unless you need them both present for some reason. (WireLog) 2014-10-13 05:57:25 admin http://mysite/processwire/ Warning: there appear to be two copies of module "InputfieldCKEditor" on the file system. Please remove the one in /site/modules/ unless you need them both present for some reason. (WireLog) 2014-10-13 05:57:25 admin http://mysite/processwire/ Warning: there appear to be two copies of module "InputfieldCKEditor" on the file system. Please remove the one in /site/modules/ unless you need them both present for some reason. (WireLog) Those warnings about CKeditor are expected and I remove duplicates
-
Table is already there so no need to create it by hand. Site is working like nothing happened I tried and upgraded another site with 2.4.0 and the error is again present, but everything is working.
-
I replaced wire/core and wire/modules (and index.php) but not wire\templates-admin folder. In the wire/modules/System/SystemUpdater there are SystemUpdate1.php, SystemUpdate4.php, SystemUpdate5.php, SystemUpdate6.php, SystemUpdate7.php, SystemUpdate9.php and SystemUpdater.module. Log file system-updater.txt looks fine, no errors there. Yes, I know I shouldn't modify anything under wire, since upgrade will overwrite files, but sometimes it is just quick fix. Still learning a proper way to hook
-
Thx for link. I tried upgrade from 2.4.0 to 2.5.4 this is the error I got: WireCache: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pw.caches' doesn't exist
-
Looking at InputfieldDatetime.module I see, that Jquery datepicker js file is chosen only if languages are installed. I would like to always use specific datepicker js file and this is easy doable, but I don't want to modify core sources. Is there workaround? Matjaž
-
Hi! I plan to upgrade from 2.4.2 to 2.5.2 (latest stable?). I know one should just replace wire directory (and index.php and .htaccess - I'm on windows with IIS) with new version, but still, should I expect problems? Or should I use upgrade module? I use just a few modules PageListPin, JqueryDatatables, Ckeditor, Fieldtypeselect. I also copied wire\modules\AdminThemeDefault to wire\templates-admin to use with my custom ProcessPageEdit module. I wasn't following the developement and this forum for few months, I just noticed some modules that might be of help (Databasebackups, Siteprofileexporter, ProcesswireUpgrade beta). I'm just a bit confused and need guidance (and help if something goes wrong). Since backup is everything, what is the best approach to make databased backup (and restore later on)?
-
How to render simple link (eg. Cancel) in the form right after the Save button on page edit?
-
Hi! How to write a module (where to hook) if I would like to use page edit link in front-end and perform redirect after successful Save (returning url could also be the same page the link is displayed): $url = $config->urls->admin . "page/delete/?id={$page->id}&modal=1&redirectUrlAfterSave=somewhere"; echo "<a href='$url>edit</a>";
-
Is ProCache supported on IIS?
- 20 replies
-
- cache
- markup cache
-
(and 2 more)
Tagged with:
-
inserting links from link list using tinyMCE
matjazp replied to wobe's topic in Module/Plugin Development
I'm interested ... -
horst, thank you for both scripts. I'm using your first solution and that's all I need.
-
Yes, it would be easier. Maybe Ryan will see this post ... Another question: I have a page with two Filetype fields: files (multiple files are allowed) and onefile (maximum file upload = 1). User is allowed to access just onefile (I'm using fredi), he uploads the file and then this new uploaded file should get appended to other files: if($page->onefile) { $page->setOutputFormatting(false); $page->files->append($page->onefile); $page->save(); $page->setOutputFormatting(true); } Now I would like to "empty" onefile field to be ready for the next upload but without deleting the actual file itself.
-
I would like to reverse the order of files listed in File field type. File upload form would be displayed first, then the list of files, new files would be listed at the top, older at the bottom. Possible?
-
horst, thx for the hints. Another question: how to "move" individual file object from one File field to another File field without removing the file itself? Eg. have a page with two fields: files (multiple files are allowed) and onefile (maximum file upload = 1). User is allowed to access just onefile (I'm using fredi), he uploads the file and then this new uploaded file should get appended to other files: if($page->onefile && count($page->onefile)) { $page->setOutputFormatting(false); $page->files->append($page->onefile); $page->save(); $page->setOutputFormatting(true); } Now I would like to "empty" onefile field (to be ready for the nex upload) but without deleting the actual file itself.
-
I have a page with files (attachments). I would like to allow a user to add files as simple as possible. I don't want to give the user full access to admin. So click on the link/button "Add new attachment" would open modal with login form, after successful login a file upload would be presented to the user and he would upload the file. Thanks for any hints.
-
1.) Didn't know its that easy 3.) I ended up using pages (like 100 of them, growing each month, used as minutes of a meeting) with just title and file field. Page title is used as description. That also gives me an option to sort pages by -created (newest on top), and also gives an option to create new page from the "Add New". 4.) International characters gets deleted, they should be replaced (š->s, ž->z et c) like when slug is created from title.
-
Hi, I have some questions: How to access placeholder value on textfields in templates(.php)? eg. $var = $page->mytextfield->placeholdervalue; How to use pwlink, used in ckeditor, in templates (APIs)? I could create my own fields but why invent the wheel? (Wishlist: add fullscreen plugin to ckeditor ). How to replace file in File field type and preserve file name and position (now I delete the file, add new one, move to the right position, very annoying). How to prevent file name modification when uploading file (eg. don't want blanks get replaced with underline)?
-
Yes, that's what I was looking for, /{$page->id}/ is ok for me (didn't try site map)! Great job, thank you. Suggestion: if I choose to rewrite all links, then enabled templates/pages are probably irrelevant.
-
@Pete: for me it is much easier to remember the number eg. 1058 than some-very-long-fancy-url. @Adrian: fix for PW subdirectory is ok. Let me know if you modify your module to support id based render methods.
-
Thx for the link. If you know where and when to hook ... Yes, this would be very nice addition to your module. And yes, that would apply only to specific (selected) pages/templates (or all if none is selected). Maybe this settings should be in the page and template instead in the module. I also found a small bug: if you run PW in subdirectory, then example links in "ShortLinks" are not correct (subdir is missing).
-
I would like that all PW modules/function/methods be aware of possibility to use IDs instead of urls. Let say I have page with title Test (url=test, id=1000) and two children: Foo (url=foo, id=1001) and Bar (url=bar, id=1002). echo $page->children->render(); produces something like: <ul> <li><a href="/foo/">Foo</a></li> <li><a href="/bar/">Bar</a></li> </ul> What I would like is that echo $page->children->render(); creates this: <ul> <li><a href="/1001/">Foo</a></li> <li><a href="/1002/">Bar</a></li> </ul> Your module just add an option to use ID on specific templates/pages (and that is great) but I have to write my own method/function to display ID's, because render() will always echo page url and not page ID. I hope I made myself clear (English is not my native language).