Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted November 12, 20159 yr I have a custom app that uses Content Items without containers. Everything is great, until I added the ability to delete an item. I end up with a "We could not find the item you are trying to view" error. Eventually found the root cause in \IPS\Content\Controller, line 459. if( \IPS\Request::i()->action == 'delete' ) { \IPS\Output::i()->redirect( $item->container()->url() ); } Can we please stop assuming that everything follows the Container -> Item -> Comment structure? It's extremely frustrating. If containers are supposed to be optional, let's please try and keep them optional. I can provide other examples of where the structure is tied together, if necessary. I've hit this wall more than once, unfortunately.
November 12, 20159 yr odd HS, as i built keywords without using a container and did not run into this. is this on 4.0 or 4.1? (i'll double check keywords to make sure i'm not doing something else as i have overloaded the delete method).
November 12, 20159 yr Author 34 minutes ago, CodingJungle said: odd HS, as i built keywords without using a container and did not run into this. is this on 4.0 or 4.1? (i'll double check keywords to make sure i'm not doing something else as i have overloaded the delete method). 4.1.3.2. I don't recall this happening before either (in 4.0), but it's definitely there now...
November 12, 20159 yr 2 minutes ago, HeadStand said: 4.1.3.2. I don't recall this happening before either (in 4.0), but it's definitely there now... i do recall it acting a bit weird till i added these properties: /** * @brief URL Base */ public static $urlBase = 'app=keywords&module=keywords&controller=view&id='; /** * @brief URL Base */ public static $urlTemplate = 'keywords_list'; /** * @brief SEO Title Column */ public static $seoTitleColumn = 'word'; but other than that, i overload the delete() method, only to ensure the keywords cache gets updated.
November 12, 20159 yr Yes, making the system more abstract is on our list to do for a future version. For now, just overload the moderate() method in your controller.
November 12, 20159 yr while you are at it, can you take a look at the contentRouter language string that assumes there is a container as well, cause: Posted 'keyword' in on the my activity is sorta weird looking :)
Archived
This topic is now archived and is closed to further replies.