Jump to content

MarkE

Members
  • Posts

    1,098
  • Joined

  • Last visited

  • Days Won

    12

MarkE last won the day on September 12 2024

MarkE had the most liked content!

Recent Profile Visitors

6,586 profile views

MarkE's Achievements

Hero Member

Hero Member (6/6)

660

Reputation

  1. Also, the error is given by the core - wire/core/PagesEditor.php Try putting in a dump before the relevant line (902 in my version) with a backtrace to see what is causing it.
  2. Hi @BigRed. Could you supply some more details - maybe some screenshots? Also version numbers etc. I've never seen that error.
  3. Actually, those assets are not necessary just to view the documentation, only the ones in the help directory are needed. I'm not sure why it tries to load them (will look into later), but it should not affect the display of the help.
  4. Hi @spoetnik. Could you give more context for that? Versions, browsers etc. I can't replicate the problem.
  5. It's working fine for me!
  6. I have a site which has been in regular use for several years. I now have a new user with a MacBook (not sure of exact version). This user has a weird problem when adding a new page. See below for what looks like a standard page add screen. but immediately after typing the 's', this is what happens: The name field turns into a fieldset containing the login (which then fails). No other user has this problem. This user does not have the problem on any other device (iPhone, Windows PC). Any ideas what is going on here? Thanks!
  7. Back up your database first!
  8. Surely the easiest way to do this is to use TracyDebugger console?
  9. ALTER DATABASE databasename CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE tablename CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; Just need to change the field tables which need to hold emoticons
  10. I have enabled the emoticons plugin for TinyMCE. It appears to work when editing the page but, after saving, the emoticon just appears as ???? Any suggestions?
  11. Prompted by @ryan's recent enhancement of the page tree display, I wanted to display an alphabetical index of pages rather than a numerical one, so I built a hook after MarkupPagerNav::render. You can see the result here: https://ncorchards.co.uk/main/fruit-orchards/apples/ Basically the hook just replaces render() with a modified version. The key modifications are to select all the items without limit: $items = $event->arguments(0); //PageArray $itemSelector = $items->getSelectors(true); // true returns the string rather than the object $noLimit = preg_replace('/,\s*limit=-?\d+/i', '', $itemSelector); and then to modify the pager: $pagerNav = new PagerNav($object->totalItems, $object->itemsPerPage, $object->pageNum); $pagerNav->setLabels($objectOptions['previousItemLabel'], $objectOptions['nextItemLabel']); $pagerNav->setNumPageLinks($object->numPageLinks); $pager = $pagerNav->getPager(); $allItems = $this->find($noLimit)->explode('title'); $itemsPerPage = $object->itemsPerPage; foreach($pager as $key => $item) { if(!ctype_digit("$item->label")) continue; $index = (int) $item->label; $itemTitle = $allItems[($index - 1) * $itemsPerPage]; $item->label = substr($itemTitle, 0, 2); } If anyone wants the full hook code, let me know, but you will probably want to modify it for your own use anyway and the above are the key bits.
  12. v0.4.0 adds the ability to break out of the modal into a full page view. This is useful for admins who might require full page access but should not be used when the modal is called from the front end. It is enabled by showing a button in the modal.
  13. See my post re the context Now that I know the cause, my solution is to build a selector that always operates on the DB, by merging the user's selector with the one that was used to generate the Page Array: /** * Find the first generation of children that matches the given selector. * * This method traverses the children of the given parent page, generation by generation, * and returns the matches in first generation that has matches for the provided selector. * * @param Page $parentPage The parent page whose children are to be searched. * @param string $selector The selector to match against the children. * @return PageArray Returns a PageArray of the first generation that has matches, or an empty PageArray if no matches are found. */ public function findFirstMatchingGeneration(Page $parentPage, string $selector) { $currentGeneration = $parentPage->children(); $count = 1; while($currentGeneration->count()) { $currentSelector = $currentGeneration->getSelectors(true); $matching = $this->pages()->find("$currentSelector, $selector"); if($matching->count()) { return $matching; // Return the first generation that has matches } // Move to the next generation $nextGeneration = new PageArray(); foreach($currentGeneration as $child) { $nextGeneration->add($child->children()); } $count += 1; $currentGeneration = $nextGeneration; } return new PageArray(); // Return an empty PageArray if no matches are found }
  14. Any idea how, in my context?
  15. AKA 'bugs'? Are these documented somewhere. I'm wondering if it is possible to apply a sanitizer hook to fix them.
×
×
  • Create New...