Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

7 Neutral

1 Follower

About iipa

  • Rank
    Jr. Member

Recent Profile Visitors

191 profile views
  1. Oon some browser+OS combos that button does not work, unfortunately. I actually have debug on, since we haven't launched yet, but I'm also starting to lean into problem being in server side configurations. I managed to accomplish this in CKEditor's config.js by adding config.disallowedContent = '*{*}'; which does it automatically when pasting. It was also enough to keep server happy aswell!
  2. Well that's propably why, since I have 3.0.123! Thanks @dragan, sometimes the simplest things to check just don't come to mind ๐Ÿ˜„
  3. I have a CKEditor Textarea in a page template. Some users like to add text in them by pasting from Word document. This leads to internal server error when saving page. When using paste without formatting (cmd + shift + V), page is saved normally, so I assume error has something to do with Word's hidden characters that cause issues in many other programs as well. (I don't have Word myself, so I debugged this with video chat with user. I forgot to ask to check code view, so I'm not sure if they are visible there.) Is there a way in ProcessWire/PHP to sanitize Textarea input from these hidden characters, or can I prevent this by changing editor settings (listed below, if it helps)? I don't like leaving error handling rely to user action - somebody always forgets to do things specific way and it weakens user experience. Textarea formatting: none (htmlspecialchars off) field type: CKEditor content type: markup/html experimental markup/html settings: all on acf: on html purifier: on additional purify settings: all on extra allowed content: none add-ons: pwimage, pwlink, sourcedialog sourcedialog settings: none disabled add-ons: image, magicline
  4. Hi @Robin S! I'm a bit confused with your solution. I tried to use your code, it threw me "Uncaught Error: Undefined class constant 'statusFlagged'". I looked at wire/Page.php, and it doesn't seem to have statusFlagged: static protected $statuses = array( 'locked' => self::statusLocked, 'systemID' => self::statusSystemID, 'system' => self::statusSystem, 'draft' => self::statusDraft, 'versions' => self::statusVersions, 'temp' => self::statusTemp, 'hidden' => self::statusHidden, 'unpublished' => self::statusUnpublished, 'trash' => self::statusTrash, 'deleted' => self::statusDeleted, 'systemOverride' => self::statusSystemOverride, 'corrupted' => self::statusCorrupted, ); Am I looking at the wrong place, or has it been renamed?
  5. Thanks @Edison, that was what I was asking ๐Ÿ™‚ Although @elabx and @dragan have good points: Composer usage might be pretty handy, and good to learn. I installed Composer, include_once() with correct path, but class cannot be found. Should I also put use [namespace]?
  6. What do you mean with "just get it from Github"? How do I refer to it from ProcessWire?
  7. Hi fellow developers! I want to implement following action: Admin-priviledged user uploads a spreadsheet file (with many sheets) When page is saved, back end generates repeater items from the sheets We can render spreadsheet data from the repeater field. Profit! Currently I'm trying to find a way to read the uploaded spreadsheet file. ProcessWire doesn't seem to have modules suitable for my needs, but external PHP Library PhpSpreadsheet sounds like it could do the job. However, I can't even try it, because I simply don't understand how I can refer to an external library! Folder structure: templates _func.php > where I want to refer to the library libraries PhpSpreadsheet bunch of *.php > what I want to refer to I have tried different things varying from their documentation to forum posts and PW API with no luck. I would prefer not to use Composer, since it seems kind of overkill for one library. Thanks in advance and have a great day!
  8. Hi louis, Gideon and szabesz - long time no see! ๐Ÿ˜ My syntax is same as yours, but somehow it still doesn't load it. I'm thinking it might be because I didn't load favicon through ProcessWire, I just put the image in server through SFTP. Testing still continues, since I've been busy with other things. Suggestions of cause are still welcome, and I will post if I find the solution myself!
  9. Hi @dragan, I'm fairly new to ProcessWire forums, so a bit over two months later I finally see your response ๐Ÿ˜… Console didn't show anything suspicious, and neither did ProcessWire error logs. However, some time after scratching my head around this issue I noticed that it solved itself - no idea when, how or why, but every icon is shown correctly now. Hopefully I won't come around this issue again!
  10. I had some issues with server provider and subdomain SSL certificate (I want all my sites use forced https), but after those were resolved, @dragan's solution works perfectly! So thanks again, now I'm able to use actual data also in testing phase, which helps in UI design.
  11. Thank you @Robin S, that is exactly what I need! Referring to a field through form in hooks is something I haven't come across yet. It's always exciting to find new things to explore!
  12. Hi! I have two Page Reference fields: Category and Subcategory. Category is parent of Subcategory, and can have 0 to n Subcategories. Fields are selected by dropdown selection. I'm trying to achieve following logic: 1. Select Category (obviously works) 2. Change Subcategory options based on selected Category (this works) 3. Hide the Subcategory field if Category has no Subcategories (to prevent weird dropdown with nothing to select) I have tried to investigate two possible alternatives to achieve step 3: A) Make dynamic condition into Subcategory selection's "Only visible if..." field B) Make a hook that fires when Category changes, then hides Subcategory field if Category has no children So far I haven't been successful in either. Conditions I've tried always lead to hidden field, and I haven't been able to find set up a hook that fires on field change. So here's the question (finally): Is there a way to alter field visibility in API, for example in ready.php or inside a hook? In API I could loop through categories, find the ones that have children and then make a selector based on their IDs.
  13. Wow, that sounds nice as well! And fairly easy to implement too. You know what they say, work smart, not hard!
  14. Hmm, that's a good point. There certainly are some risks that come with having the same database that I haven't considered. Thanks for pointing them out! First solution doesn't work in this case, because client wants to test how things work with adding real content, so they probably wouldn't like the idea of things being wiped with every update. The second option with migrations sounds cool though - might be just what I need!
  15. Hi everybody! I have been reading about Multisite, but it kinda bugs me that every topic talks about having both admin and database same for multiple sites. I have a project where customer tests it by adding content to the site, while I still need to do some changes here and there in code, maybe some in database. If something crashes for a while, customer can't keep testing, which is a bit problematic. Is there any way that I could have two separate versions of one site ("production" and development) that share the same database, but are otherwise independent? Just the thought of having to migrate database every time I want to show client something new gives me anxiety ๐Ÿ˜
  • Create New...