-
Worgage started following Album Listener not firing , [bug] Can't update Meta tags and Hook or Extension for IPS\File?
-
[bug] Can't update Meta tags
I'm trying to update meta tags for a specific page. I'm using the "live meta tag editor". I go to my page, and update the missing tag, in this case "og: title" writing "test". I press save and the popup confirms the change. "Meta tags for this page have been saved." But when I go back to the page, it's not there:
-
-
Unable to view old images
After updating, users can't view most of my old images in the gallery. The issue is apparently with the "image_metadata" field in the database, which is currently an empty string instead of an empty array. I managed to fix the issue with a query that updated all the rows in my database that matched " ". Shouldn't this have been done automatically during the update? TypeError: IPS\gallery\Image::get_metadata(): Return value must be of type array, null returned (0) #0 [...] /website/system/Patterns/ActiveRecord.php(360): IPS\gallery\Image->get_metadata()
-
Hook or Extension for IPS\File?
Sure! Even though that’s pretty much it haha!
-
Hook or Extension for IPS\File?
I don’t find it hard to imagine worse things than moving files in a directory haha! Back to the original question, though. As a workaround, is there a way to move the files after they are created? Maybe with a listener on the Image node?
-
-
-
Hook or Extension for IPS\File?
The "parser" is on the same server as InVision. Calling the API multiple times to recreate the tree structure seems a bit excessive to me compared to simply adding the two lines of code I had back in V4 ðŸ˜
-
Hook or Extension for IPS\File?
Yes! The folder where I store my pictures is connected to another internal application that needs this tree-structure to work properly. Also if I need to locate 1 picture specifically from the server I don't have to scroll trough thousands of files with random names all the time.
-
-
Hook or Extension for IPS\File?
ugh... it was so simple to do this with the previous hooks system.
-
-
Hook or Extension for IPS\File?
That's why I developed my own application. I'm just trying to migrate it using the new listeners / extensions system but I can't find the right solution.
-
Hook or Extension for IPS\File?
Because I like to store my files in a more organized way, each album becomes a folder inside a category folder, and so on, instead of having thousands of pictures dumped into the "uploads" folder without meaning lol.
-
Hook or Extension for IPS\File?
I'm building an extension that allows me to save the pictures of each album in a specific folder. In my previous application, I used to make a hook on Ips\file for the getClass function and check if $storageExtension was for the gallery. If it was, I would replace the container with my custom path. What would be the best way to achieve this override?
-
Album Listener not firing
Alright, thank you. I guess I'll just manually edit the template for now
-
Album Listener not firing
Yes! That works now! Just one last question if I may: how do I add a new field in the modal to create a new album? all the elements returned by my "formElements" function appear only in the "edit" modal.
-
Album Listener not firing
But the NodeListener class only has the "onDelete" method as available event, or am I missing something? /** * @method onDelete( Model $node ) : void */ class NodeListenerType extends ListenerType { /** * @brief Determine whether this listener requires an explicitly set class * Example: MemberListeners are always for \IPS\Member, but ContentListeners * will require a specific class. * @var bool */ public static bool $requiresClassDeclaration = TRUE; /** * Defines the classes that are supported by each Listener Type * When a new Listener Type is created, we must specify which * classes are valid (e.g. \IPS\Content, \IPS\Member). * * @var array */ protected static array $supportedBaseClasses = array( Model::class ); }
-
Album Listener not firing
I'm trying to upgrade my old application that had some gallery hooks. I'm trying to turning the old hooks into Listeners, but not all events are firing as expected. I created a content listener for the class \IPS\gallery\Album\Item, but only "onDelete" and "onView" are firing, why onBeforeCreateOrEdit isn't'? What I'm expecting is to see this log to appear the moment I create a new album. class albumItemHook extends ContentListenerType { public static string $class = \IPS\gallery\Album\Item::class; public function onBeforeCreateOrEdit( ContentClass $object, array $values, bool $new = FALSE ): void { Log::log( 'before' ); } }
-
-
alonzothe3 started following Worgage
-
-
-
Reset Admin Theme
Yes, I did Oh thank you! It cleared the theme cache and now it's working.