Zeka Posted September 30, 2016 Posted September 30, 2016 Hi. I have page tree like that: Product Types ( name: catalog_filters ) disinfectants-and-hygiene antibiotics-injectable antibiotics-oral Products ( name: products ) product1 product2 Also I have hook in my ready.php function productCategoriesAndTypes(HookEvent $event){ $page = $event->object; if($page->template == 'product-category' || $page->template == 'product-type') $event->return = "/products/$page->name/"; } $wire->addHookAfter("Page::path", "productCategoriesAndTypes"); It works as expeted and I get modified urls in PageTree, PagePreview and in ProcessPageEdit: But after page save I get not hooked page url It looks like ProcessPageEdit does not respect hook in ready.php. Is it a bug or I'm missing some setting or it is not right place for hook or I have hook also some other method? As further investigation I have found that problem comes from Link abstraction option in textarea field settings
Soma Posted September 30, 2016 Posted September 30, 2016 I recommend not doing such a hook in the admin as it creates a lot . f problems. If then only on frontend.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now