-
Posts
6,798 -
Joined
-
Last visited
-
Days Won
158
Everything posted by Soma
-
Anybody can confirm?
-
I'm not able to find it though.
-
1. I noticed a strange thing when using $page->image->size(0,50)->url; and the image is already 50px height the image variation won't get created! 2. I also remember someone else mention this, but haven't been able to search When I have a image that has like 200x800px (extreme portrait) and using upscaling=false $page->image->size(200,100)->url; will create an image that isn't 200x100 !? I think it has to do with the ratio and the upscaling feature. When I set upscaling=true it doesn't work. Anybody able to reproduce.
-
Interesting bump
-
I think I have discovered a bug with images. When using the save+test feature, i get errors with image field. THe image field is a single image field and I write: $page->image->size(0,50)->url TemplateFile: Method Pageimages::size does not exist or is not callable in this context So no matter what image field max files is set to it's always threated as array. But on front-end the code works, just not in the preview/test. I have to write $page->image->first()->size(0,50)->url to make it work in the admin preview, but then the code doesn't work anymore on front-end. Ace editor: I already got this with the ace editor fieldtype from adam, the code has tabs added at the end of the text. Sometimes it grows and grows after saving the code...
-
I figured this doesn't trigger when using good old Fredi. The nice thing it would be simple to add support cause of modulotastic PW if($this->modules->isInstalled("FrediProcess")) { $this->addHookAfter('FrediProcess::execute', $this, 'loadTabs'); } Shall I make a PR or would you consider adding it? Thanks
-
Something related to this maybe. Another detail I'm seeing is that repeater pages that are saved in the admin branch don't have the status for alternative language set to active. Is this intended or was it missed somehow? Since I can't set it via the repeater I think they should be active by default? Not sure what the intention is/was.
-
Thanks Nik fr confirming. Another thing: (was my problem only) Further more I noticed something else again maybe related. I created repeater items via API for those pages. Now I can't access them with $page->repeater->first() $page->repeater->first() // doesn't return the first repeater although it's there. Once I go to edit the page and change a value on that repeater item and save, it works. Ok this is my fault sorry. I was using the Shop module and the integer value is required to show the add to cart and I missed that it requires the price to show.
-
This also maybe has to do with repeater field being added to pages that already exist. I created repeater via API on those pages and once I open them in the admin I get the notice above and only default text input instead one for each language. Once I reload the page the notice is gone and the title language field is again correctly showing language inputs.
-
Testing further: Deinstalled Language Support to rule that out. Now I found out: The repeater.count=0 only works for pages that are once saved after the repeater is added to the template. So to say it different: For pages that are not yet saved, once after the repeater was added to the template, it doesn't find them.
-
I can't get the pages that have repeater.count=0 No results: $pa = $pages->find("template=basic-page,myrepeater.count=0"); doesn't give me the pages where there's no repeater element created yet. Works: $pa = $pages->find("template=basic-page,myrepeater.count>0"); this works correct $pa = $pages->find("template=basic-page,myrepeater.count=2"); this also. I have Language Support installed, in case that matter at all. I have tested in different installs and I can't get it to work, but thought I was able to do this count=0 on repeaters the other day. Anybody able to reproduce this?
-
Multilanguage support installed. Latest PW dev. A repeater with the page title language. When adding a new item to the repeater, the title field only shows 1 input and not for all languages. This is on first time adding item, after saving I get Notice: Trying to get property of non-object in /Applications/XAMPP/xamppfiles/htdocs/pw2-dev/wire/modules/LanguageSupport/LanguageSupport.module on line 209 Notice: Trying to get property of non-object in /Applications/XAMPP/xamppfiles/htdocs/pw2-dev/wire/modules/LanguageSupport/LanguageSupportFields.module on line 131 Only after saving the page yet once again , the page title are shown correct in repeater with input for each language. Anybody abel to reproduce this? It happens all in different installs I have.
-
I don't have a public install, so I just setup a test intall on my ISP. As it's nothing special to a install or project, it's a general things happening on all installs. But meanwhile I get another error.... so even more confusing... So this is still about the repeater thing and editing/saving pages on front-end on a alternative language. I sent you a PM Ryan. (The issue mentioned last, with "field_title.data1011" for default lang, is a completely different case, and no repeater involved there)
-
The advanced image scaling inside TinyMCE doesn't work anymore for me in Chrome/FF lately I tested in various installs and version. Anybody can reproduce this? Mainly it's when inserting an image and drag resize it, in Chrome it completely messes up the image (not shown anymore) and in FF it also screws up. There's error shown in some and some not. I tried to get the hang of what's wrong again with this as I fixed some issue for Chrome a while ago. I'm getting tired of wywiwyg!!!
-
Ryan, so showing or hiding a repeater isn't supported? I'm NOT using dependecies in the repeater but to show/hide the complete repeater. Again, I have this setup, with a checkbox to toggle a fieldset and a repeater (also a fieldset no?) I have a simple checkbox checked : show repeater / hide other fieldset unchecked: hide repeater / show other fieldset Multilanguage installed. Repeater has also multilanguage title. But I don't think it has to do this it. Can anybody reproduce this pls? Lately anything I report, Ryan doesn't seem to be able to reproduce. :/ ---- Required option: The required option for a repeater field was always there, it has nothing to do with dependencies. But it doesn't work with them to set a repeater required.
-
While this technic is nice to know it is much easier to enable compression via .htaccess, also because of the reason Ryan mentions. I don't see any reason why to do this via PHP. See the H5BP htaccess for nice technic https://github.com/h5bp/html5-boilerplate/blob/master/.htaccess#L379 and other goodies. Also only while the html served might be 4kb instead of 24kb, this doesn't make the page load that much faster, but using this for all resources along with caching headers you get a ~30% decrease of file sizes. Using PW template cache can have the most impact on page loading, depending on how render intensive the page is, you get a loading time around factor 2-5 times faster just because it doesn't need to render it.
-
I get strange behaviors when using a checkbox to show/hide a repeater field it seems very buggy. I try a setup like: Checkbox on : show repeater / hide other fieldset off: hide repeater / show other fieldset Inititially it works fine, but as soon as I created a repeater and delete it again, then save. The toggle with the checkbox doesn't hide the repeater anymore. I need to save it again with checkbox unchecked, but doesn't matter what it just is completly messed up. ---- Maybe not related: Additionally I recognized something, I have repeater with and a title field language (title is required), and sometime when saving and not filling in title (required) I get this notice Notice: Trying to get property of non-object in /home/www-data/mittendrin.update.ch/wire/modules/LanguageSupport/LanguageSupport.module on line 209 Notice: Trying to get property of non-object in /home/www-data/mittendrin.update.ch/wire/modules/LanguageSupport/LanguageSupport.module on line 209 Notice: Trying to get property of non-object in /home/www-data/mittendrin.update.ch/wire/modules/LanguageSupport/LanguageSupport.module on line 209 Notice: Trying to get property of non-object in /home/www-data/mittendrin.update.ch/wire/modules/LanguageSupport/LanguageSupportFields.module on line 131 Which is a notice, ok, but the strange thing is that the repeater title language suddenly doesn't have languages fields anymore, just one title text field. The repeater has 3 ready pages. And also maybe you already know but "required" doesn't work with repeater, but the option is there, but maybe it's because of dependencies?
-
Just to clarify, in prev version 1.2 the code you posted works just fine. But it changed in 1.2 and route is a module.
-
You need to load the route module additionally to angular.js http://code.angularjs.org/1.2.0rc1/ <script src="http://code.angularjs.org/1.2.0rc1/angular.js"></script> <script src="http://code.angularjs.org/1.2.0rc1/angular-route.js"></script> <script src="js/app.js"></script> app.js angular.module('phonecat', ['ngRoute']). config(['$routeProvider', function($routeProvider) { $routeProvider. when('/phones', {templateUrl: 'partials/phone-list.html', controller: PhoneListCtrl}). when('/phones/:phoneId', {templateUrl: 'partials/phone-detail.html', controller: PhoneDetailCtrl}). otherwise({redirectTo: '/phones'}); }]); where partials/phone-list.html could also be a PW page url with a partials template with url segments enabled create a page: /partials/ then the route configured like: /partials/phone-list and in the template file if($input->urlSegment1 == "phone-list"){ echo "<div>your partial template ... </div>"; }
-
Install db session module and you'll have a setup page with users. (not installed in core)
-
$time = Debug::timer(); echo Debug::timer($time); and my ChromePhpLogger ? module
-
You maybe wan't to look into the debug.inc that comes with the admin theme /wire/templates-admin/debug.inc and counting queries is kinda pointless, the type of queries are important.
-
If you create a template divider and place the page it in the tree you could do: function hookGetListClass($event){ $child = $event->arguments("page"); if($child->template == "divider"){ $event->return = " divider"; } } $options = array( 'xtemplates' => 'divider', 'xitem_tpl' => '' ); $nav->addHookAfter("getListClass", null, "hookGetListClass"); echo $nav->render($options); Create as many divider pages as you like and name them "-------------------------------------------"
-
Hello it's me again! Ok, I now maybe lost already days with this... and loosing my mind slowly... and seen so many problems and error that I think has to do with the language support in general. It shows there definately some hard to track and explain "bugs" or miss-behaviors of the system. I thought it is all very easy but turns out it is not at all, or I am just not made for this. As I'm said I'm trying to import many data from another system to multilanguage pages in PW in step by step each language. Newest thing was that images got added twice to fields, when there's only one and only one save happens before and after. After long time I found it has to do with language and user somehow again! I then found that by $pages->uncacheAll() after the save it works again. That's cool but I have no idea why. A test on a simple script to create a page and add an image works fine, just not in the script I build which is quite complex already. I have to manually set the user language after each save and somehow it screws up a lot due to not understanding what's happening. Depending on if you're on default or alternative language the behaviour is different as we already found out. Now I was removing the workaround of setting user language after saving because I'm already working on default language, and suddenly I get this: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_title.data1011' in 'where clause'' in /Applications/XAMPP/xamppfiles/htdocs/blank.ch/wire/core/DatabaseQuery.php:86 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/blank.ch/wire/core/DatabaseQuery.php(86): PDOStatement->execute() #1 /Applications/XAMPP/xamppfiles/htdocs/blank.ch/wire/core/PageFinder.php(146): DatabaseQuery->execute() #2 /Applications/XAMPP/xamppfiles/htdocs/blank.ch/wire/core/Pages.php(143): PageFinder->find(Object(Selectors), Array) #3 [internal function]: Pages->___find('has_parent=4349...', Array) #4 /Applications/XAMPP/xamppfiles/htdocs/blank.ch/wire/core/Wire.php(359): call_user_func_array(Array, Array) #5 /Applications/XAMPP/xamppfiles/htdocs/blank.ch/wire/core/Wire.php(317): Wire->runHooks('find', Array) #6 [internal function]: Wire->__call('find', Array) #7 /Applications/XAMPP/xamppfiles/htdocs/blank.ch/wire/core/Page.php(862): Pages->find('has_parent=4349...', Array) #8 in /Applications/XAMPP/xamppfiles/htdocs/blank.ch/wire/core/DatabaseQuery.php on line 86 Seriously PW seems to now look to a title language field of the default data field_title.data1011 : the default language is 1011 and the title in the default language is field_title.data and not field_title.data1011. Just as a pointer to others maybe trying to create a multilanguage site imported and created via a script/bootstrap, DON'T as you will regret it as long as those bugs are still in there. Ok ... breath slowly Soma ...