Jump to content

mel47

Members
  • Posts

    361
  • Joined

  • Last visited

Everything posted by mel47

  1. Hi I have a very basic interrogation about admin. I started to build my own module for users to manage the website (for example export or email sending), via a specific menu. Works well. But now, I wanted to add a config page (currently under home tree, using a settings template). This page contains fields for text, checkbox and images, and have to be edited by website users frequently. Searching around forum and different admin config modules, if I understand correctly, I can't save images, since they are not pages. Do I'm right? Do I should only use a link to harmonize the feeling and find everything under the same menu? How, you, experienced people, manage this kind of settings page? Thanks!
  2. I found a workaround, related to an other issue. I ended by moving the order of fields. BTW, no error in console. Thanks
  3. Thanks. But I tried to debug a lot in the last days, and tracked down the problem today, but I can't explain which kind of interference is involved. It seems to be related to fields' order in this specific template! Changing imagefield to last position (or at least after 2 pagesfield) solve the problem. Not ideal but working. Strangely, the problem was not on new pages, just those already created (months ago). I changed some fields in the template since then, but never touched to this imagefield. Furthermore, the same field is used in 2 others different templates, it doesn't show this behavior. I don't think yet it's related to modules (I used disabled all modules by Tracy), but didn't solve. However, I kind of solved my 2nd problem that seems to be related, moving also mapmarker field at the end of template, also solve the geocoding problem. Mel
  4. Hi I have a problem that I didn't have before (not sure when was "before" though...). However all last year' pages displayed a correct localization. If I typed an address, it will not localized until I check/uncheck the geocode true/false. However, saving the page doesn't retain the "ok rooftop" result, and return to "request denied". After a couple of saving pages, I eventually get lat/long saved but the status is still "request denied". Furthermore, I discovered I can't modify addresses on certain pages (those created by guest (form builder)). It may be related to my similar problem about image undeletable. Under 3.0.123, both local and production. Google API is enabled for billing. Anyway, address with a previous correct localization are displayed fine. Thanks!
  5. Hi I have a really strange problem. I have a images field on a certain template with a maxfile=1. Normally I could replace the image by a new one without problem. However, now, when I drag the new image, it seems to replace. However after saving the page, both images are there. And it's impossible to delete any of them. But the notification mentions the image is deleted! I discovered it happens only under a specific template, and on page created by "guest" (which are Form builder). Those created via admin act normally (meaning image replaced). Modification of other text fields in the template are correctly saving. On 3.0.123 (but since a couple a dev version), both on local or production server. Permissions is 755 for folder and 644 for file. Deactivated all hooks in ready.php to be sure. If someone could point me some directions to search... Thanks Mel
  6. Hi I discovered ag-grid documentation (since I solved all my Rockfinder problems, thanks!). I have really general questions. How I should decide what to put in BeforeInit vs AfterInit? For example, why the visible/hidden column are in AfterInit? I want to have a modified version of YesNo plugin. How I can do that? For now, I rename with a slightly different name and add it in /assets/Rockgrid folder. Is it the good way to do it (it works BTW)? Where I should put CSS file? I added in /assets/Rockgrid/style.css and link into my PHP file. However, for some reasons, I'm not able to use row classes. The class is well added in html but CSS classes's are overridden. However If I used instead inline CSS directly in the JS file, the row is correctly styled. I have many Rockgrid fields, sharing some columns. How I can define some common column headers (definition, style, etc..) instead of re-write on each field.js file? Thanks! Mel
  7. Wow, thanks so much @PWaddict! I saw this post by chance this morning. Those hour differences on my server always annoyed me but I never searched to solve them. And you just give the perfect solution! ? Mel
  8. Thanks. Effectively working, I messed up titles of fields. Feel a little bit noob... ?
  9. Thanks! Was able to successfully display children/parent pages. Looks like this : $contact = new RockFinder('template=contact', ['title', 'parent_id']); $org = new RockFinder('template=organisme', ['title']); $contact->join($org, 'contact', ['id' => 'parent_id']); return $contact; However, I can't add any other fields like I normally do: $contact = new RockFinder('template=contact, include=all', ['title', 'parent_id', 'nom', 'prenom']); I guess it have to be done after the join or have to be written in a different way? I couldn't find any example on your documentation similar to that. Thanks again! Mel
  10. Hi, I use a slightly modified version of http://modules.processwire.com/modules/textformatter-glossary/ to achieve this task. I'm not sure if it's exactly the same mechanism, though. I will eventually test yours and see if it suits my needs. Mel
  11. ah ok, it's strange. I forgot to mention, but it was already set as required. But I get full length on frontend. Anyway, it's not the most important thing...
  12. Hello, Just a quick question/confirmation. I set a maximum length for textarea to 200 characters. However, I was expecting some kind of warning to user before saving (else the red color of the counter). But it seems not, and the page is saved without problem. Is it the expected behavior? Thanks Mel
  13. Hi, Still digging in the module. I have 2 questions: Does it have a limit of columns to be added? For now, I have 22 columns + 17 columns added with ->addField. It's probably too much: it works but it's really, really slow (minutes) and freeze everything else. Strangely I just remove a couple of fields (~5-10) and it's appear rather quickly. All those fields belongs to 1 single template (so just left joins). I have ~200 rows. In fieldtypes supported there is a file named "pagestable". I guess it's not "Profields: Page table"? Anyway it doesn't work with ->addField, it just print id. I search for another syntax, but I couldn't find it. Thanks again Mel
  14. @bernhard Thanks!!! I should have written before... ? Anyway, I can continue my exploration!
  15. Hi. I'm searching since a couple of days why I get this behavior. I follow your example for pages but it never display with separator (in my picture id=1284 or 1286 or 1290). I have no idea why, maybe an expert eye could spot something. $finder = new \ProcessWire\RockFinder('template=activite', ['title']); //really simple example $field =$finder->addField('discipline', ['title']); $field->separator = "|"; return $finder->getSQL(); SELECT `rockfinder`.* FROM /* original pw query */ (SELECT pages.id FROM `pages` WHERE (pages.templates_id=58) AND (pages.status<1024) GROUP BY pages.id ) as `pwfinder` /* rockfinder */ LEFT JOIN ( SELECT `pages`.`id` AS `id`, `title`.`title` AS `title`, `discipline`.`discipline` AS `discipline`, `discipline`.`title` AS `discipline:title` FROM `pages` /* --- join title --- */ LEFT JOIN (SELECT `pages_id` AS `pageid`, `title`.`data` AS `title` FROM `field_title` AS `title`) AS `title` ON `title`.`pageid` = `pages`.`id` /* --- end title --- */ /* --- join discipline --- */ LEFT JOIN (SELECT `discipline`.`pages_id` AS `pageid`, `discipline`.`data` AS `discipline`, GROUP_CONCAT(`title`.`data` ORDER BY `discipline`.`sort` SEPARATOR ',') AS `title` FROM `field_discipline` AS `discipline` LEFT JOIN `field_title` AS `title` ON `title`.`pages_id` = `discipline`.`data` GROUP BY `discipline`.`pages_id`, `discipline`.`data`) AS `discipline` ON `discipline`.`pageid` = `pages`.`id` /* --- end discipline --- */ ) AS `rockfinder` ON `pwfinder`.`id` = `rockfinder`.`id` /* end rockfinder */ Thanks!!
  16. Hi, Thanks for this module, it's quite useful, and it's work very well. However, I still wondering which icons I can use? I can't find anywhere a list or a reference to an iconset used by the module. Mel
  17. ok thanks for answer. I will think if I should or not change my structure.
  18. Hello! Do you think it's easy to convert a Repeater -> PageTable ? I don't know enough to see if the existing action PageTable->repeater could be inverted. Thanks!
  19. Thanks, looks pretty amazing even for my very small testing. I generally learning by reading other's code examples. Since there mostly anything, I have a quick question. I could display really easily page and repeater independently. But is it possible to display the title of page found inside a repeater ? For now I only have id. I tried many ways, but without success, but I'm not sure if I'm trying to do something impossible or not. Thanks!
  20. OMG @jmartsch and @bernhard, success!! ? I tried the new version on my production website and it's working!
  21. Same result, juste a name change. ReferenceError: RockGrid is not defined edit:578:7 initGrid_rockgriddemo http://localhost/24h/admin/page/edit/:578:7 <anonyme> http://localhost/24h/admin/page/edit/:589:7 <div class="RockGridWrapper backend InputfieldIgnoreChanges" id="RockGridWrapper_rockgriddemo"> <div id="RockGridItem_rockgriddemo" class="RockGridItem ag-theme-balham" data-id="rockgriddemo" style='height: 300px'></div> <div class="init"></div> </div> <script> // translation strings for this grid var RockGridStr_rockgriddemo = { } // grid settings object var gridSettings_rockgriddemo = { grid: 'rockgriddemo', dataColumns: ["id","title","created"], data: "ajax", js: {"settings":{"initPageSize":10,"pageSizes":[10,25,50,100],"height":300}}, }; // function to init the grid var initGrid_rockgriddemo = function() { RockGrid.init(gridSettings_rockgriddemo); //////ERROR IS HERE RockGrid.getGrid('rockgriddemo').str = RockGridStr_rockgriddemo } // load the grid automatically or manually? if(typeof onLoad_rockgriddemo == 'function') { // load grid manually // sometimes this is needed when we have to wait for other grids to be loaded onLoad_rockgriddemo(gridSettings_rockgriddemo, RockGridStr_rockgriddemo); } else { // load this grid when dom is loaded initGrid_rockgriddemo(); ///////ERROR IS HERE } </script> If I don't put the .js file I have no extra error. If I add it to /site/assets/Rockgrid/fields/ I get error (404) : I try add to frontend, but same result, a white space, with same errors than below. For the tester, don't exactly what means "work" since I never used. But there nothing in "result", but the "resulting sql" is updated accordingly of changes done in "code to execute". I certainly do something wrong or don't have something activated correctly. Will give up for now, since I have other things to do. I will continue to follow the thread in case a solution eventually come out. Thanks for you time. Mel
  22. Hi Sorry for the delay, was too sunny to stay inside... ? So to recap. I tried on 2 installations (one with my current site and one empty, ie no module). Both are local, running php 7.0. I'm using firefox. Install rockfinder via module repository install rockgrid by url (https://gitlab.com/baumrock/RockGrid/-/archive/master/RockGrid-master.zip) create a "projects" rock-grid field and add it to home template Go to home template; see an empty white field with this error: ReferenceError: RockGrid is not defined[En savoir plus] edit:118:7 initGrid_projects http://localhost/wire/processwire/page/edit/:118:7 <anonyme> http://localhost/wire/processwire/page/edit/:129:7 Add to /site/assets/RockGrid/fields/projects.js and project.php (copied from usage instructions. Now see this error Échec du chargement pour l’élément <script> dont la source est « http://localhost/site/assets/RockGrid/fields/projects.js ». edit:61 as mentioned earlier it's not the good address, it missing the domain, in this case : http://localhost/wire/site/assets/RockGrid/fields/projects. Hope it helps. Mel PS No error during module installation. Debug info display under the field seems ok (default mysql query): 0.4ms getSQL SELECT `rockfinder`.* FROM /* original pw query */ (SELECT pages.id FROM `pages` WHERE (pages.status<1024) GROUP BY pages.id ORDER BY pages.created DESC ) as `pwfinder` LEFT JOIN ( /* rockfinder */ SELECT `pages`.`id` AS `id`, `title`.`title` AS `title`, `created`.`created` AS `created` FROM `pages` /* --- join title --- */ LEFT JOIN (SELECT `pages_id` AS `pageid`, `title`.`data` AS `title` FROM `field_title` AS `title`) AS `title` ON `title`.`pageid` = `pages`.`id` /* --- end title --- */ /* --- join created --- */ LEFT JOIN (SELECT `id` AS `pageid`, `created` FROM `pages` AS `created`) AS `created` ON `created`.`pageid` = `pages`.`id` /* --- end created --- */ /* end rockfinder */ ) AS `rockfinder` ON `pwfinder`.`id` = `rockfinder`.`id` 0ms executeClosures 1.2ms getObjects Includes executeClosures 1.3ms Overall Inputfield Render
  23. Why I'm always the one who still have the error.? I did install via upload of zip and I have /modules/RockGrid. However, I still have errors: 1)The path is wrong for js, it should be : localhost/24h/site/assets/RockGrid/fields/test_grid.js 2)error mentioned earlier Also, not related, but playing with the Tester, I wrote some wrong code which gave me a red error page. The problem is that I didn't know how to reset. (finally I reinstalled since of error above). Thanks!
  24. Both are front end. I think I will go with my first idea. Seems more complicated than is it in fact...
  25. Hello! The kind of thing I will really like to use!
×
×
  • Create New...