Open fkelly12054 opened 3 years ago
Continuing on: created a new content type, with just body field and image field. Used "original image" as the "style" ... the default setting. Effectively this uses NO STYLE for the image. Created a content type item. Added an image. It shows up properly. Then went into the manage display for that content type. Changed the style to max_650_650 style I have on my system. Now the content type item puts the image in the correct style directory ... in other words within default/files/styles/max_650x650/public/2012-12/ ...
rather than in the strange /core directory. In other words, a plain out of the box Drupal site that doesn't use Juicebox will stuff images in the right place to work with styles, but something (probably in the Juicebox code, but not for sure yet) is creating a strange directory structure within /styles and not putting images in the right place.
Time to ride the exercise bike.
Trying to isolate where this "public/core/modules/image" part of the path for the style is coming from. Writing down the steps here because it is impossible to remember them "after the fact" (for me anyway). So, I had a gallery_square_thumbnail style. I deleted it. the directory for it is gone from my file system. I deleted references in manage display of my content type. Now ... in admin/config/media/image_styles I create a new one. Dang: it goes in styles/gallery_square_thumbnail/public/core/modules/image ... so not likely to be a Juicebox issue.
taking notes. Looking at my relatively new Drupal 9 site. The styles directory has four styles: "juicebox_large", "large", "medium" and "thumbnail". In the filesystem these are directly beneath styles and then there is a /public directory beneath each, Beneath that there is a "date" directory (say 2020-12) and then beneath that the few jpg files I've added. No core/public/modules/image stuff at all. Funny on the config/media/image_styles screen I get seven styles listed even though 3 of the seven aren't show i the file system. These are all juicebox related styles.
Now I'll add a style ... I'll use gallery square thumbnail. At this point this has nothing to do with the juicebox code. The style gets created in "styles/gallery_square_thumbnail/public/core/modules/image" just like it did on my Drupal 8 system.
Now let's see what happens when I try to replicate the way David created his gallery.
Added body field. Added primary image and three more. Went to save the results and got:
Error: Call to undefined function Drupal\juicebox\Plugin\Field\FieldFormatter\entity_get_display() in Drupal\juicebox\Plugin\Field\FieldFormatter\JuiceboxFieldFormatter->buildContextualLinks() (line 336 of D:\webpage\dr9\web\modules\juicebox\src\Plugin\Field\FieldFormatter\JuiceboxFieldFormatter.php)
An unexpected error has occurred.
Line 336 is: $display_entity = entity_get_display($entity_type_id, $bundle, $this->viewMode);
I'll run a quick compare to make sure I've got the latest code on my Drupal 9 site.
Don't try to replicate my steps until I'll push my changes. I replaced deprecated entity_get_display() ...
On Sat, Dec 5, 2020 at 9:57 PM fkelly12054 notifications@github.com wrote:
taking notes. Looking at my relatively new Drupal 9 site. The styles directory has four styles: "juicebox_large", "large", "medium" and "thumbnail". In the filesystem these are directly beneath styles and then there is a /public directory beneath each, Beneath that there is a "date" directory (say 2020-12) and then beneath that the few jpg files I've added. No core/public/modules/image stuff at all. Funny on the config/media/image_styles screen I get seven styles listed even though 3 of the seven aren't show i the file system. These are all juicebox related styles.
Now I'll add a style ... I'll use gallery square thumbnail. At this point this has nothing to do with the juicebox code. The style gets created in "styles/gallery_square_thumbnail/public/core/modules/image" just like it did on my Drupal 8 system.
Now let's see what happens when I try to replicate the way David created his gallery.
Added body field. Added primary image and three more. Went to save the results and got:
Error: Call to undefined function Drupal\juicebox\Plugin\Field\FieldFormatter\entity_get_display() in Drupal\juicebox\Plugin\Field\FieldFormatter\JuiceboxFieldFormatter->buildContextualLinks() (line 336 of D:\webpage\dr9\web\modules\juicebox\src\Plugin\Field\FieldFormatter\JuiceboxFieldFormatter.php)
0
D:\webpage\dr9\web\modules\juicebox\src\Plugin\Field\FieldFormatter\JuiceboxFieldFormatter.php(256): Drupal\juicebox\Plugin\Field\FieldFormatter\JuiceboxFieldFormatter->buildContextualLinks(Array, 'node')
An unexpected error has occurred.
Line 336 is: $display_entity = entity_get_display($entity_type_id, $bundle, $this->viewMode);
I'll run a quick compare to make sure I've got the latest code on my Drupal 9 site.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fkelly12054/juicebox-kelly/issues/14#issuecomment-739415156, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQHTBCXTFETCZDFO5ZELHTSTKNE7ANCNFSM4UOTI6AA .
I did not push my code to my fork yet. I have it locally on my machine. I'll do it tomorrow when I'll clean-up my code. See you!
On Sat, Dec 5, 2020 at 10:16 PM DK koutas@gmail.com wrote:
Don't try to replicate my steps until I'll push my changes. I replaced deprecated entity_get_display() ...
On Sat, Dec 5, 2020 at 9:57 PM fkelly12054 notifications@github.com wrote:
taking notes. Looking at my relatively new Drupal 9 site. The styles directory has four styles: "juicebox_large", "large", "medium" and "thumbnail". In the filesystem these are directly beneath styles and then there is a /public directory beneath each, Beneath that there is a "date" directory (say 2020-12) and then beneath that the few jpg files I've added. No core/public/modules/image stuff at all. Funny on the config/media/image_styles screen I get seven styles listed even though 3 of the seven aren't show i the file system. These are all juicebox related styles.
Now I'll add a style ... I'll use gallery square thumbnail. At this point this has nothing to do with the juicebox code. The style gets created in "styles/gallery_square_thumbnail/public/core/modules/image" just like it did on my Drupal 8 system.
Now let's see what happens when I try to replicate the way David created his gallery.
Added body field. Added primary image and three more. Went to save the results and got:
Error: Call to undefined function Drupal\juicebox\Plugin\Field\FieldFormatter\entity_get_display() in Drupal\juicebox\Plugin\Field\FieldFormatter\JuiceboxFieldFormatter->buildContextualLinks() (line 336 of D:\webpage\dr9\web\modules\juicebox\src\Plugin\Field\FieldFormatter\JuiceboxFieldFormatter.php)
0
D:\webpage\dr9\web\modules\juicebox\src\Plugin\Field\FieldFormatter\JuiceboxFieldFormatter.php(256): Drupal\juicebox\Plugin\Field\FieldFormatter\JuiceboxFieldFormatter->buildContextualLinks(Array, 'node')
An unexpected error has occurred.
Line 336 is: $display_entity = entity_get_display($entity_type_id, $bundle, $this->viewMode);
I'll run a quick compare to make sure I've got the latest code on my Drupal 9 site.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fkelly12054/juicebox-kelly/issues/14#issuecomment-739415156, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQHTBCXTFETCZDFO5ZELHTSTKNE7ANCNFSM4UOTI6AA .
Emailed you. But yes, I'll wait. Done for today anyway.
Sunday morning. I have pulled all the changes to my local juicebox directories for 8 and 9. Testing on the 9 site, which is "cleaner" I deleted the Gallery Square thumbnail style. The directories styles/gallery_square_thumbnail/public/core/modules/image were deleted.
Created a new square thumbnail gallery style. It put the style and a png in styles/square_thumbnail_galleryl/public/core/modules/image directory. We'll see what happens when I try to replicate adding a content type using images.
As first step in replication I came in to check out the content type "jbox images". With the format on manage display set to Juicebox Gallery I get the gear icon for format settings, Juicebox Gallery. But an obsolete style appears on the Thumbnail Style drop down. It's called Juicebox Thumbnail 85x85. I have deleted that style. Try cache clear. No luck. We will have to see where this list of available styles is coming from.
Continuing, I tried to add a main image and two additional ones. When the content item is saved they go successfully in sites/default/files/2020-12 ... but on retrieving the newly created content item the files aren't found. looking at log messages for both the content item creation and the retrieval ... I'll put the messages in a new comment.
for retrieval I get:
"Warning: file_get_contents(modules/juicebox/js/juicebox.js): failed to open stream: No such file or directory in Drupal\Core\Asset\JsOptimizer->optimize() (line 25 of D:\webpage\dr9\web\core\lib\Drupal\Core\Asset\JsOptimizer.php)
jbox_images: added Replication attempt.
(Replication attempt was the name of the content item). But also in the log are indications that the manage display screen has problems related to recent commits.
Deprecated function: call_user_func_array() expects parameter 1 to be a valid callback, non-static method Drupal\juicebox\JuiceboxFormatter::preRenderFieldsets() should not be called statically in Drupal\Core\Render\Renderer->doTrustedCallback() (line 100 of D:\webpage\dr9\web\core\lib\Drupal\Core\Security\DoTrustedCallbackTrait.php)
If I'm not mistaken this code was recently added.
In short, my replication attempt is not working.
juicebox image styles are defined in .yml files in config/install/ folder
On Sun, Dec 6, 2020 at 4:11 PM fkelly12054 notifications@github.com wrote:
for retrieval I get: "Warning: file_get_contents(modules/juicebox/js/juicebox.js): failed to open stream: No such file or directory in Drupal\Core\Asset\JsOptimizer->optimize() (line 25 of D:\webpage\dr9\web\core\lib\Drupal\Core\Asset\JsOptimizer.php)
0 D:\webpage\dr9\web\core\includes\bootstrap.inc(301):
_drupal_error_handler_real(2, 'file_get_conten...', 'D:\webpage\dr9...', 25, Array)" In my log messages I also see and indication that the content item was added: "http://dr9/node/add/jbox_images
jbox_images: added Replication attempt.
(Replication attempt was the name of the content item). But also in the log are indications that the manage display screen has problems related to recent commits.
Deprecated function: call_user_func_array() expects parameter 1 to be a valid callback, non-static method Drupal\juicebox\JuiceboxFormatter::preRenderFieldsets() should not be called statically in Drupal\Core\Render\Renderer->doTrustedCallback() (line 100 of D:\webpage\dr9\web\core\lib\Drupal\Core\Security\DoTrustedCallbackTrait.php)
0 D:\webpage\dr9\web\core\includes\bootstrap.inc(301): *drupal_error_handler_real(8192,
'call_user_func*...', 'D:\webpage\dr9...', 100, Array)
1 https://github.com/fkelly12054/juicebox-kelly/pull/1 [internal
function]: drupal_error_handler(8192, 'call_user_func...', 'D:\webpage\dr9...', 100, Array)
2 https://github.com/fkelly12054/juicebox-kelly/pull/2
D:\webpage\dr9\web\core\lib\Drupal\Core\Security\DoTrustedCallbackTrait.php(100): call_user_func_array(Array, Array)
If I'm not mistaken this code was recently added.
In short, my replication attempt is not working.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fkelly12054/juicebox-kelly/issues/14#issuecomment-739516167, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQHTBD72PPU3IJOWPT74YTSTONKVANCNFSM4UOTI6AA .
In admin UI you can see them at /admin/config/media/image-styles Whenever Drupal needs to render the image with defined image-style, it takes the original image and makes resize/crops to the orginal and store them on the file-system for later use.
On Sun, Dec 6, 2020 at 4:22 PM DK koutas@gmail.com wrote:
juicebox image styles are defined in .yml files in config/install/ folder
On Sun, Dec 6, 2020 at 4:11 PM fkelly12054 notifications@github.com wrote:
for retrieval I get: "Warning: file_get_contents(modules/juicebox/js/juicebox.js): failed to open stream: No such file or directory in Drupal\Core\Asset\JsOptimizer->optimize() (line 25 of D:\webpage\dr9\web\core\lib\Drupal\Core\Asset\JsOptimizer.php)
0 D:\webpage\dr9\web\core\includes\bootstrap.inc(301):
_drupal_error_handler_real(2, 'file_get_conten...', 'D:\webpage\dr9...', 25, Array)" In my log messages I also see and indication that the content item was added: "http://dr9/node/add/jbox_images
jbox_images: added Replication attempt.
(Replication attempt was the name of the content item). But also in the log are indications that the manage display screen has problems related to recent commits.
Deprecated function: call_user_func_array() expects parameter 1 to be a valid callback, non-static method Drupal\juicebox\JuiceboxFormatter::preRenderFieldsets() should not be called statically in Drupal\Core\Render\Renderer->doTrustedCallback() (line 100 of D:\webpage\dr9\web\core\lib\Drupal\Core\Security\DoTrustedCallbackTrait.php)
0 D:\webpage\dr9\web\core\includes\bootstrap.inc(301): *drupal_error_handler_real(8192,
'call_user_func*...', 'D:\webpage\dr9...', 100, Array)
1 https://github.com/fkelly12054/juicebox-kelly/pull/1 [internal
function]: drupal_error_handler(8192, 'call_user_func...', 'D:\webpage\dr9...', 100, Array)
2 https://github.com/fkelly12054/juicebox-kelly/pull/2
D:\webpage\dr9\web\core\lib\Drupal\Core\Security\DoTrustedCallbackTrait.php(100): call_user_func_array(Array, Array)
If I'm not mistaken this code was recently added.
In short, my replication attempt is not working.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fkelly12054/juicebox-kelly/issues/14#issuecomment-739516167, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQHTBD72PPU3IJOWPT74YTSTONKVANCNFSM4UOTI6AA .
In fact, you don't need to resize images before uploading if using image styles. Drupal takes care of resizing/cropping if the uploaded image has image style applied
On Sun, Dec 6, 2020 at 4:26 PM DK koutas@gmail.com wrote:
In admin UI you can see them at /admin/config/media/image-styles Whenever Drupal needs to render the image with defined image-style, it takes the original image and makes resize/crops to the orginal and store them on the file-system for later use.
On Sun, Dec 6, 2020 at 4:22 PM DK koutas@gmail.com wrote:
juicebox image styles are defined in .yml files in config/install/ folder
On Sun, Dec 6, 2020 at 4:11 PM fkelly12054 notifications@github.com wrote:
for retrieval I get: "Warning: file_get_contents(modules/juicebox/js/juicebox.js): failed to open stream: No such file or directory in Drupal\Core\Asset\JsOptimizer->optimize() (line 25 of D:\webpage\dr9\web\core\lib\Drupal\Core\Asset\JsOptimizer.php)
0 D:\webpage\dr9\web\core\includes\bootstrap.inc(301):
_drupal_error_handler_real(2, 'file_get_conten...', 'D:\webpage\dr9...', 25, Array)" In my log messages I also see and indication that the content item was added: "http://dr9/node/add/jbox_images
jbox_images: added Replication attempt.
(Replication attempt was the name of the content item). But also in the log are indications that the manage display screen has problems related to recent commits.
Deprecated function: call_user_func_array() expects parameter 1 to be a valid callback, non-static method Drupal\juicebox\JuiceboxFormatter::preRenderFieldsets() should not be called statically in Drupal\Core\Render\Renderer->doTrustedCallback() (line 100 of D:\webpage\dr9\web\core\lib\Drupal\Core\Security\DoTrustedCallbackTrait.php)
0 D:\webpage\dr9\web\core\includes\bootstrap.inc(301): *drupal_error_handler_real(8192,
'call_user_func*...', 'D:\webpage\dr9...', 100, Array)
1 https://github.com/fkelly12054/juicebox-kelly/pull/1 [internal
function]: drupal_error_handler(8192, 'call_user_func...', 'D:\webpage\dr9...', 100, Array)
2 https://github.com/fkelly12054/juicebox-kelly/pull/2
D:\webpage\dr9\web\core\lib\Drupal\Core\Security\DoTrustedCallbackTrait.php(100): call_user_func_array(Array, Array)
If I'm not mistaken this code was recently added.
In short, my replication attempt is not working.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fkelly12054/juicebox-kelly/issues/14#issuecomment-739516167, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQHTBD72PPU3IJOWPT74YTSTONKVANCNFSM4UOTI6AA .
Check out /admin/config/media/image-styles/manage/juicebox_square_thumb The thumb is scaled to 85x85 from its originals
On Sun, Dec 6, 2020 at 4:28 PM DK koutas@gmail.com wrote:
In fact, you don't need to resize images before uploading if using image styles. Drupal takes care of resizing/cropping if the uploaded image has image style applied
On Sun, Dec 6, 2020 at 4:26 PM DK koutas@gmail.com wrote:
In admin UI you can see them at /admin/config/media/image-styles Whenever Drupal needs to render the image with defined image-style, it takes the original image and makes resize/crops to the orginal and store them on the file-system for later use.
On Sun, Dec 6, 2020 at 4:22 PM DK koutas@gmail.com wrote:
juicebox image styles are defined in .yml files in config/install/ folder
On Sun, Dec 6, 2020 at 4:11 PM fkelly12054 notifications@github.com wrote:
for retrieval I get: "Warning: file_get_contents(modules/juicebox/js/juicebox.js): failed to open stream: No such file or directory in Drupal\Core\Asset\JsOptimizer->optimize() (line 25 of D:\webpage\dr9\web\core\lib\Drupal\Core\Asset\JsOptimizer.php)
0 D:\webpage\dr9\web\core\includes\bootstrap.inc(301):
_drupal_error_handler_real(2, 'file_get_conten...', 'D:\webpage\dr9...', 25, Array)" In my log messages I also see and indication that the content item was added: "http://dr9/node/add/jbox_images
jbox_images: added Replication attempt.
(Replication attempt was the name of the content item). But also in the log are indications that the manage display screen has problems related to recent commits.
Deprecated function: call_user_func_array() expects parameter 1 to be a valid callback, non-static method Drupal\juicebox\JuiceboxFormatter::preRenderFieldsets() should not be called statically in Drupal\Core\Render\Renderer->doTrustedCallback() (line 100 of D:\webpage\dr9\web\core\lib\Drupal\Core\Security\DoTrustedCallbackTrait.php)
0 D:\webpage\dr9\web\core\includes\bootstrap.inc(301): *drupal_error_handler_real(8192,
'call_user_func*...', 'D:\webpage\dr9...', 100, Array)
1 https://github.com/fkelly12054/juicebox-kelly/pull/1 [internal
function]: drupal_error_handler(8192, 'call_user_func...', 'D:\webpage\dr9...', 100, Array)
2 https://github.com/fkelly12054/juicebox-kelly/pull/2
D:\webpage\dr9\web\core\lib\Drupal\Core\Security\DoTrustedCallbackTrait.php(100): call_user_func_array(Array, Array)
If I'm not mistaken this code was recently added.
In short, my replication attempt is not working.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fkelly12054/juicebox-kelly/issues/14#issuecomment-739516167, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQHTBD72PPU3IJOWPT74YTSTONKVANCNFSM4UOTI6AA .
Juicebox Thumbnail 85x85 is not obsolete. Is used as the tsquared thumb preview image on Juicebox Gallery.
On Sun, Dec 6, 2020 at 4:31 PM DK koutas@gmail.com wrote:
Check out /admin/config/media/image-styles/manage/juicebox_square_thumb The thumb is scaled to 85x85 from its originals
On Sun, Dec 6, 2020 at 4:28 PM DK koutas@gmail.com wrote:
In fact, you don't need to resize images before uploading if using image styles. Drupal takes care of resizing/cropping if the uploaded image has image style applied
On Sun, Dec 6, 2020 at 4:26 PM DK koutas@gmail.com wrote:
In admin UI you can see them at /admin/config/media/image-styles Whenever Drupal needs to render the image with defined image-style, it takes the original image and makes resize/crops to the orginal and store them on the file-system for later use.
On Sun, Dec 6, 2020 at 4:22 PM DK koutas@gmail.com wrote:
juicebox image styles are defined in .yml files in config/install/ folder
On Sun, Dec 6, 2020 at 4:11 PM fkelly12054 notifications@github.com wrote:
for retrieval I get: "Warning: file_get_contents(modules/juicebox/js/juicebox.js): failed to open stream: No such file or directory in Drupal\Core\Asset\JsOptimizer->optimize() (line 25 of D:\webpage\dr9\web\core\lib\Drupal\Core\Asset\JsOptimizer.php)
0 D:\webpage\dr9\web\core\includes\bootstrap.inc(301):
_drupal_error_handler_real(2, 'file_get_conten...', 'D:\webpage\dr9...', 25, Array)" In my log messages I also see and indication that the content item was added: "http://dr9/node/add/jbox_images
jbox_images: added Replication attempt.
(Replication attempt was the name of the content item). But also in the log are indications that the manage display screen has problems related to recent commits.
Deprecated function: call_user_func_array() expects parameter 1 to be a valid callback, non-static method Drupal\juicebox\JuiceboxFormatter::preRenderFieldsets() should not be called statically in Drupal\Core\Render\Renderer->doTrustedCallback() (line 100 of D:\webpage\dr9\web\core\lib\Drupal\Core\Security\DoTrustedCallbackTrait.php)
0 D:\webpage\dr9\web\core\includes\bootstrap.inc(301): *drupal_error_handler_real(8192,
'call_user_func*...', 'D:\webpage\dr9...', 100, Array)
1 https://github.com/fkelly12054/juicebox-kelly/pull/1 [internal
function]: drupal_error_handler(8192, 'call_user_func...', 'D:\webpage\dr9...', 100, Array)
2 https://github.com/fkelly12054/juicebox-kelly/pull/2
D:\webpage\dr9\web\core\lib\Drupal\Core\Security\DoTrustedCallbackTrait.php(100): call_user_func_array(Array, Array)
If I'm not mistaken this code was recently added.
In short, my replication attempt is not working.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fkelly12054/juicebox-kelly/issues/14#issuecomment-739516167, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQHTBD72PPU3IJOWPT74YTSTONKVANCNFSM4UOTI6AA .
You can setup Juicebox to show either thumbs or dots (in display format edit) see http://sandboxd9.test.pink-future.cz/
On Sun, Dec 6, 2020 at 4:36 PM DK koutas@gmail.com wrote:
Juicebox Thumbnail 85x85 is not obsolete. Is used as the tsquared thumb preview image on Juicebox Gallery.
On Sun, Dec 6, 2020 at 4:31 PM DK koutas@gmail.com wrote:
Check out /admin/config/media/image-styles/manage/juicebox_square_thumb The thumb is scaled to 85x85 from its originals
On Sun, Dec 6, 2020 at 4:28 PM DK koutas@gmail.com wrote:
In fact, you don't need to resize images before uploading if using image styles. Drupal takes care of resizing/cropping if the uploaded image has image style applied
On Sun, Dec 6, 2020 at 4:26 PM DK koutas@gmail.com wrote:
In admin UI you can see them at /admin/config/media/image-styles Whenever Drupal needs to render the image with defined image-style, it takes the original image and makes resize/crops to the orginal and store them on the file-system for later use.
On Sun, Dec 6, 2020 at 4:22 PM DK koutas@gmail.com wrote:
juicebox image styles are defined in .yml files in config/install/ folder
On Sun, Dec 6, 2020 at 4:11 PM fkelly12054 notifications@github.com wrote:
for retrieval I get: "Warning: file_get_contents(modules/juicebox/js/juicebox.js): failed to open stream: No such file or directory in Drupal\Core\Asset\JsOptimizer->optimize() (line 25 of D:\webpage\dr9\web\core\lib\Drupal\Core\Asset\JsOptimizer.php)
0 D:\webpage\dr9\web\core\includes\bootstrap.inc(301):
_drupal_error_handler_real(2, 'file_get_conten...', 'D:\webpage\dr9...', 25, Array)" In my log messages I also see and indication that the content item was added: "http://dr9/node/add/jbox_images
jbox_images: added Replication attempt.
(Replication attempt was the name of the content item). But also in the log are indications that the manage display screen has problems related to recent commits.
Deprecated function: call_user_func_array() expects parameter 1 to be a valid callback, non-static method Drupal\juicebox\JuiceboxFormatter::preRenderFieldsets() should not be called statically in Drupal\Core\Render\Renderer->doTrustedCallback() (line 100 of D:\webpage\dr9\web\core\lib\Drupal\Core\Security\DoTrustedCallbackTrait.php)
0 D:\webpage\dr9\web\core\includes\bootstrap.inc(301): *drupal_error_handler_real(8192,
'call_user_func*...', 'D:\webpage\dr9...', 100, Array)
1 https://github.com/fkelly12054/juicebox-kelly/pull/1 [internal
function]: drupal_error_handler(8192, 'call_user_func...', 'D:\webpage\dr9...', 100, Array)
2 https://github.com/fkelly12054/juicebox-kelly/pull/2
D:\webpage\dr9\web\core\lib\Drupal\Core\Security\DoTrustedCallbackTrait.php(100): call_user_func_array(Array, Array)
If I'm not mistaken this code was recently added.
In short, my replication attempt is not working.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fkelly12054/juicebox-kelly/issues/14#issuecomment-739516167, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQHTBD72PPU3IJOWPT74YTSTONKVANCNFSM4UOTI6AA .
Yes, I see that and I noticed the initial image styles that get installed with Juicebox in the config/install folder YML files yesterday. They seem to go in the correct place in the file system. But styles I add after that in admin/config/media/image-styles are going in (what seems like) the wrong directory structure. That may not be true. But the image files being saved when I add a content item trying to replicate your setup are going in: ... the code below is from a view source when the images didn't appear. It is generated by the template file named: juicebox-embed-markup-html.
<img src="/sites/default/files/styles/juicebox_large/public/2020-12/20151101_130011.jpg?itok=r36r-60y" alt="Chandelier" title="20151101_130011.jpg" typeof="foaf:Image" />
<img src="/sites/default/files/styles/juicebox_large/public/2020-12/20151101_130354.jpg?itok=S5eq7roo" alt="glass museum" title="20151101_130354.jpg" typeof="foaf:Image" />
The problem is that the files are actually being stored in /files/2020-12 ... not in the juicebox_large/public/2020-12 directory.
Frustrating. I think I may take a step back and blow away my whole Drupal 9 site and reinstall a fresh one using composer. Then add in the current juicebox module from this git site. I don't like the way Drupal is placing the styles directories and the way the images are getting saved at the wrong locations, then can't be found when I retrieve the content type items. Maybe something about the way the Juicebox module is installed is wrong. I may stick with 9.09 (or whatever is current) for Drupal just because that will be the immediate "target" for anyone upgrading.
I see the dots you are suggesting can be configured for thumbnails. They are on the Juicebox Lite config screen, not on the pro one. I guess we need to do both configuration options and they are cumulative?
Could you look into the deprecated function error message I posted if you get a chance. Thanks.
I should have a new Drupal 9 site set up by tomorrow with the latest Juicebox that we have here. Then I'll have another shot at replicating what you've done ... I can see that that approach to creating a gallery is very attractive. I just need to make it work and get the files to go in the right place.
Well, it seems to me the image styles have not been generated for some reason on your machine. Original (uploaded) images should go to in /files/2020-12 Resized/cropped styled image should go to e.g. /files/styles/juicebox_large/public/2020-12/
Can you do a quick check if styled images were generated in your /files/styles/juicebox_large/public/2020-12 after you had uploaded the image? If not, there's some trouble on your side as it works for me here.
On Sun, Dec 6, 2020 at 5:20 PM fkelly12054 notifications@github.com wrote:
Yes, I see that and I noticed the initial image styles that get installed with Juicebox in the config/install folder YML files yesterday. They seem to go in the correct place in the file system. But styles I add after that in admin/config/media/image-styles are going in (what seems like) the wrong directory structure. That may not be true. But the image files being saved when I add a content item trying to replicate your setup are going in: ... the code below is from a view source when the images didn't appear. It is generated by the template file named: juicebox-embed-markup-html.
<img src="/sites/default/files/styles/juicebox_large/public/2020-12/20151101_130011.jpg?itok=r36r-60y" alt="Chandelier" title="20151101_130011.jpg" typeof="foaf:Image" /> <img src="/sites/default/files/styles/juicebox_large/public/2020-12/20151101_130354.jpg?itok=S5eq7roo" alt="glass museum" title="20151101_130354.jpg" typeof="foaf:Image" />
The problem is that the files are actually being stored in /files/2020-12 ... not in the juicebox_large/public/2020-12 directory.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fkelly12054/juicebox-kelly/issues/14#issuecomment-739525592, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQHTBFD2TJFL6MI5ST6ZZTSTOVMFANCNFSM4UOTI6AA .
You might try to copy the missing image to juicebox_large/public/2020-12/... by hand and see what happens.
On Sun, Dec 6, 2020 at 5:43 PM DK koutas@gmail.com wrote:
Well, it seems to me the image styles have not been generated for some reason on your machine. Original (uploaded) images should go to in /files/2020-12 Resized/cropped styled image should go to e.g. /files/styles/juicebox_large/public/2020-12/
Can you do a quick check if styled images were generated in your /files/styles/juicebox_large/public/2020-12 after you had uploaded the image? If not, there's some trouble on your side as it works for me here.
On Sun, Dec 6, 2020 at 5:20 PM fkelly12054 notifications@github.com wrote:
Yes, I see that and I noticed the initial image styles that get installed with Juicebox in the config/install folder YML files yesterday. They seem to go in the correct place in the file system. But styles I add after that in admin/config/media/image-styles are going in (what seems like) the wrong directory structure. That may not be true. But the image files being saved when I add a content item trying to replicate your setup are going in: ... the code below is from a view source when the images didn't appear. It is generated by the template file named: juicebox-embed-markup-html.
<img src="/sites/default/files/styles/juicebox_large/public/2020-12/20151101_130011.jpg?itok=r36r-60y" alt="Chandelier" title="20151101_130011.jpg" typeof="foaf:Image" /> <img src="/sites/default/files/styles/juicebox_large/public/2020-12/20151101_130354.jpg?itok=S5eq7roo" alt="glass museum" title="20151101_130354.jpg" typeof="foaf:Image" />
The problem is that the files are actually being stored in /files/2020-12 ... not in the juicebox_large/public/2020-12 directory.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fkelly12054/juicebox-kelly/issues/14#issuecomment-739525592, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQHTBFD2TJFL6MI5ST6ZZTSTOVMFANCNFSM4UOTI6AA .
To go on we should resolve this issue before. I want you to have this working on your machine for testing purposes.
On Sun, Dec 6, 2020 at 5:49 PM DK koutas@gmail.com wrote:
You might try to copy the missing image to juicebox_large/public/2020-12/... by hand and see what happens.
On Sun, Dec 6, 2020 at 5:43 PM DK koutas@gmail.com wrote:
Well, it seems to me the image styles have not been generated for some reason on your machine. Original (uploaded) images should go to in /files/2020-12 Resized/cropped styled image should go to e.g. /files/styles/juicebox_large/public/2020-12/
Can you do a quick check if styled images were generated in your /files/styles/juicebox_large/public/2020-12 after you had uploaded the image? If not, there's some trouble on your side as it works for me here.
On Sun, Dec 6, 2020 at 5:20 PM fkelly12054 notifications@github.com wrote:
Yes, I see that and I noticed the initial image styles that get installed with Juicebox in the config/install folder YML files yesterday. They seem to go in the correct place in the file system. But styles I add after that in admin/config/media/image-styles are going in (what seems like) the wrong directory structure. That may not be true. But the image files being saved when I add a content item trying to replicate your setup are going in: ... the code below is from a view source when the images didn't appear. It is generated by the template file named: juicebox-embed-markup-html.
<img src="/sites/default/files/styles/juicebox_large/public/2020-12/20151101_130011.jpg?itok=r36r-60y" alt="Chandelier" title="20151101_130011.jpg" typeof="foaf:Image" /> <img src="/sites/default/files/styles/juicebox_large/public/2020-12/20151101_130354.jpg?itok=S5eq7roo" alt="glass museum" title="20151101_130354.jpg" typeof="foaf:Image" />
The problem is that the files are actually being stored in /files/2020-12 ... not in the juicebox_large/public/2020-12 directory.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fkelly12054/juicebox-kelly/issues/14#issuecomment-739525592, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQHTBFD2TJFL6MI5ST6ZZTSTOVMFANCNFSM4UOTI6AA .
You may register at my sandbox http://sandboxd9.test.pink-future.cz/user/register I'll confirm your registration and give you administrator permissions. So that you'll be able to compare my and yours Drupal and JuiceBox configurations.
On Sun, Dec 6, 2020 at 5:54 PM DK koutas@gmail.com wrote:
To go on we should resolve this issue before. I want you to have this working on your machine for testing purposes.
On Sun, Dec 6, 2020 at 5:49 PM DK koutas@gmail.com wrote:
You might try to copy the missing image to juicebox_large/public/2020-12/... by hand and see what happens.
On Sun, Dec 6, 2020 at 5:43 PM DK koutas@gmail.com wrote:
Well, it seems to me the image styles have not been generated for some reason on your machine. Original (uploaded) images should go to in /files/2020-12 Resized/cropped styled image should go to e.g. /files/styles/juicebox_large/public/2020-12/
Can you do a quick check if styled images were generated in your /files/styles/juicebox_large/public/2020-12 after you had uploaded the image? If not, there's some trouble on your side as it works for me here.
On Sun, Dec 6, 2020 at 5:20 PM fkelly12054 notifications@github.com wrote:
Yes, I see that and I noticed the initial image styles that get installed with Juicebox in the config/install folder YML files yesterday. They seem to go in the correct place in the file system. But styles I add after that in admin/config/media/image-styles are going in (what seems like) the wrong directory structure. That may not be true. But the image files being saved when I add a content item trying to replicate your setup are going in: ... the code below is from a view source when the images didn't appear. It is generated by the template file named: juicebox-embed-markup-html.
<img src="/sites/default/files/styles/juicebox_large/public/2020-12/20151101_130011.jpg?itok=r36r-60y" alt="Chandelier" title="20151101_130011.jpg" typeof="foaf:Image" /> <img src="/sites/default/files/styles/juicebox_large/public/2020-12/20151101_130354.jpg?itok=S5eq7roo" alt="glass museum" title="20151101_130354.jpg" typeof="foaf:Image" />
The problem is that the files are actually being stored in /files/2020-12 ... not in the juicebox_large/public/2020-12 directory.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fkelly12054/juicebox-kelly/issues/14#issuecomment-739525592, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQHTBFD2TJFL6MI5ST6ZZTSTOVMFANCNFSM4UOTI6AA .
if you register, I'll make my sandbox multi-language by adding English language and the language switcher. No problem.
On Sun, Dec 6, 2020 at 5:57 PM DK koutas@gmail.com wrote:
You may register at my sandbox http://sandboxd9.test.pink-future.cz/user/register I'll confirm your registration and give you administrator permissions. So that you'll be able to compare my and yours Drupal and JuiceBox configurations.
On Sun, Dec 6, 2020 at 5:54 PM DK koutas@gmail.com wrote:
To go on we should resolve this issue before. I want you to have this working on your machine for testing purposes.
On Sun, Dec 6, 2020 at 5:49 PM DK koutas@gmail.com wrote:
You might try to copy the missing image to juicebox_large/public/2020-12/... by hand and see what happens.
On Sun, Dec 6, 2020 at 5:43 PM DK koutas@gmail.com wrote:
Well, it seems to me the image styles have not been generated for some reason on your machine. Original (uploaded) images should go to in /files/2020-12 Resized/cropped styled image should go to e.g. /files/styles/juicebox_large/public/2020-12/
Can you do a quick check if styled images were generated in your /files/styles/juicebox_large/public/2020-12 after you had uploaded the image? If not, there's some trouble on your side as it works for me here.
On Sun, Dec 6, 2020 at 5:20 PM fkelly12054 notifications@github.com wrote:
Yes, I see that and I noticed the initial image styles that get installed with Juicebox in the config/install folder YML files yesterday. They seem to go in the correct place in the file system. But styles I add after that in admin/config/media/image-styles are going in (what seems like) the wrong directory structure. That may not be true. But the image files being saved when I add a content item trying to replicate your setup are going in: ... the code below is from a view source when the images didn't appear. It is generated by the template file named: juicebox-embed-markup-html.
<img src="/sites/default/files/styles/juicebox_large/public/2020-12/20151101_130011.jpg?itok=r36r-60y" alt="Chandelier" title="20151101_130011.jpg" typeof="foaf:Image" /> <img src="/sites/default/files/styles/juicebox_large/public/2020-12/20151101_130354.jpg?itok=S5eq7roo" alt="glass museum" title="20151101_130354.jpg" typeof="foaf:Image" />
The problem is that the files are actually being stored in /files/2020-12 ... not in the juicebox_large/public/2020-12 directory.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fkelly12054/juicebox-kelly/issues/14#issuecomment-739525592, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQHTBFD2TJFL6MI5ST6ZZTSTOVMFANCNFSM4UOTI6AA .
Okay. On manage display I changed the image style to original image. Saved a couple of images in a new content item.
Yes, they go to 2020-12 directory. I can see them in my file system. And this is very weird: when I look at the content item in Drupal on my browser the images don't show. But in view source they appear to be in the correct place. Here is one of them:
This is the correct file name, that matches what's in my file system. I'll leave my site alone for now and see if I can figure out why that's happening. Wondering if there is a path issue from either htaccess or settings.php. I'll check. I'll register on your site and maybe I can create a content type with my image files and we can compare where they go. I am still getting the deprecated function messages in my logs pretty consistently. Need to take a couple hours off!
Registration confirmed. Check your email to finish the registration process. I added lang.switcher to the site header already
On Sun, Dec 6, 2020 at 6:06 PM DK koutas@gmail.com wrote:
if you register, I'll make my sandbox multi-language by adding English language and the language switcher. No problem.
On Sun, Dec 6, 2020 at 5:57 PM DK koutas@gmail.com wrote:
You may register at my sandbox http://sandboxd9.test.pink-future.cz/user/register I'll confirm your registration and give you administrator permissions. So that you'll be able to compare my and yours Drupal and JuiceBox configurations.
On Sun, Dec 6, 2020 at 5:54 PM DK koutas@gmail.com wrote:
To go on we should resolve this issue before. I want you to have this working on your machine for testing purposes.
On Sun, Dec 6, 2020 at 5:49 PM DK koutas@gmail.com wrote:
You might try to copy the missing image to juicebox_large/public/2020-12/... by hand and see what happens.
On Sun, Dec 6, 2020 at 5:43 PM DK koutas@gmail.com wrote:
Well, it seems to me the image styles have not been generated for some reason on your machine. Original (uploaded) images should go to in /files/2020-12 Resized/cropped styled image should go to e.g. /files/styles/juicebox_large/public/2020-12/
Can you do a quick check if styled images were generated in your /files/styles/juicebox_large/public/2020-12 after you had uploaded the image? If not, there's some trouble on your side as it works for me here.
On Sun, Dec 6, 2020 at 5:20 PM fkelly12054 notifications@github.com wrote:
Yes, I see that and I noticed the initial image styles that get installed with Juicebox in the config/install folder YML files yesterday. They seem to go in the correct place in the file system. But styles I add after that in admin/config/media/image-styles are going in (what seems like) the wrong directory structure. That may not be true. But the image files being saved when I add a content item trying to replicate your setup are going in: ... the code below is from a view source when the images didn't appear. It is generated by the template file named: juicebox-embed-markup-html.
<img src="/sites/default/files/styles/juicebox_large/public/2020-12/20151101_130011.jpg?itok=r36r-60y" alt="Chandelier" title="20151101_130011.jpg" typeof="foaf:Image" /> <img src="/sites/default/files/styles/juicebox_large/public/2020-12/20151101_130354.jpg?itok=S5eq7roo" alt="glass museum" title="20151101_130354.jpg" typeof="foaf:Image" />
The problem is that the files are actually being stored in /files/2020-12 ... not in the juicebox_large/public/2020-12 directory.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fkelly12054/juicebox-kelly/issues/14#issuecomment-739525592, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQHTBFD2TJFL6MI5ST6ZZTSTOVMFANCNFSM4UOTI6AA .
Fuck. I can't click on language switcher when I'm logged in. Well, just replace cs with en in URL that works as expected. http://sandboxd9.dev2.pink-future.cz/admin/structure to http://sandboxd9.dev2.pink-future.cz/en/admin/structure
I could set English the default language of the site. I don't want to do it. This set could help us to hit and solve some multi-language Juicebox issues in the future.
On Sun, Dec 6, 2020 at 6:15 PM DK koutas@gmail.com wrote:
Registration confirmed. Check your email to finish the registration process. I added lang.switcher to the site header already
On Sun, Dec 6, 2020 at 6:06 PM DK koutas@gmail.com wrote:
if you register, I'll make my sandbox multi-language by adding English language and the language switcher. No problem.
On Sun, Dec 6, 2020 at 5:57 PM DK koutas@gmail.com wrote:
You may register at my sandbox http://sandboxd9.test.pink-future.cz/user/register I'll confirm your registration and give you administrator permissions. So that you'll be able to compare my and yours Drupal and JuiceBox configurations.
On Sun, Dec 6, 2020 at 5:54 PM DK koutas@gmail.com wrote:
To go on we should resolve this issue before. I want you to have this working on your machine for testing purposes.
On Sun, Dec 6, 2020 at 5:49 PM DK koutas@gmail.com wrote:
You might try to copy the missing image to juicebox_large/public/2020-12/... by hand and see what happens.
On Sun, Dec 6, 2020 at 5:43 PM DK koutas@gmail.com wrote:
Well, it seems to me the image styles have not been generated for some reason on your machine. Original (uploaded) images should go to in /files/2020-12 Resized/cropped styled image should go to e.g. /files/styles/juicebox_large/public/2020-12/
Can you do a quick check if styled images were generated in your /files/styles/juicebox_large/public/2020-12 after you had uploaded the image? If not, there's some trouble on your side as it works for me here.
On Sun, Dec 6, 2020 at 5:20 PM fkelly12054 notifications@github.com wrote:
Yes, I see that and I noticed the initial image styles that get installed with Juicebox in the config/install folder YML files yesterday. They seem to go in the correct place in the file system. But styles I add after that in admin/config/media/image-styles are going in (what seems like) the wrong directory structure. That may not be true. But the image files being saved when I add a content item trying to replicate your setup are going in: ... the code below is from a view source when the images didn't appear. It is generated by the template file named: juicebox-embed-markup-html.
<img src="/sites/default/files/styles/juicebox_large/public/2020-12/20151101_130011.jpg?itok=r36r-60y" alt="Chandelier" title="20151101_130011.jpg" typeof="foaf:Image" /> <img src="/sites/default/files/styles/juicebox_large/public/2020-12/20151101_130354.jpg?itok=S5eq7roo" alt="glass museum" title="20151101_130354.jpg" typeof="foaf:Image" />
The problem is that the files are actually being stored in /files/2020-12 ... not in the juicebox_large/public/2020-12 directory.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fkelly12054/juicebox-kelly/issues/14#issuecomment-739525592, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJQHTBFD2TJFL6MI5ST6ZZTSTOVMFANCNFSM4UOTI6AA .
Got to be midnight where you are ...
On Drupal dot org I found that they had done new releases of Drupal 9 and my Drupal 8.9. They are "promoting" 9.1.0. So I decided to bite the bullet and wipe out my 9.0.9 site and install a fresh 9.1.0. Done. I immediately took a look at the config/media/styles and and the associated directory structure. It does stick a style name and then /public/core/modules/image in the path followed by a png file with a sample of the style. The new install comes with four styles. So my paranoia (sorry) about Juicebox causing problems with this is gone. I installed our latest version of Juicebox in the modules directory too.
Now to see what happens. At least I am starting with a clean slate.
Built one article with image inside it. Worked fine.
Then went to replicate Juicebox gallery built on site.
Warning: file_get_contents(modules/juicebox/js/juicebox.js): failed to open stream: No such file or directory in Drupal\Core\Asset\JsOptimizer->optimize() (line 25 of D:\webpage\dr9\web\web\core\lib\Drupal\Core\Asset\JsOptimizer.php)
on view source it says it is looking for the file in: Warning: file_get_contents(modules/juicebox/js/juicebox.js): failed to open stream: No such file or directory in Drupal\Core\Asset\JsOptimizer->optimize() (line 25 of D:\webpage\dr9\web\web\core\lib\Drupal\Core\Asset\JsOptimizer.php)
In view source version of the page it says it is looking for the file in: <img src="/web/sites/default/files/2020-12/cass_light.jpg" alt="cat" title="cass_light.jpg" typeof="foaf:Image" / and when I look at file explorer it says that's where the file is. So that's promising. But why it is not being displayed as part of the content item is tomorrow's project.
I will probably reload a fresh copy of the Juicebox javascript file in the libraries directory (given that the error message says that juicebox.js can't open the file.
Getting deprecated function messages on new version as posted earlier. Don't know if they could have ramifications for the disappearing images.
As one last test for the "weekend". I went on my live system where I have probably a 100 galleries. I replicated the set up of a content type to load images directly into a content item. It worked properly the first time and looked like the layout on the sandbox site. The juicebox version on that is : 8.x-2.0-beta4.
I can find no differences between juicebox.js anywhere in my versions of the module .. all are 1.5.1 built August 12, 2017. The view source on both sites looks very similar though I haven't done a character by character compare. I even switched themes on the 9.1 site to try Olivero. The problem continues.
On the other hand, maybe this is favorable. Because I am still getting the:
Warning: file_get_contents(modules/juicebox/js/juicebox.js): failed to open stream: No such file or directory in Drupal\Core\Asset\JsOptimizer->optimize() (line 25 of D:\webpage\dr9\web\web\core\lib\Drupal\Core\Asset\JsOptimizer.php)
message. Good in a way, because at least the files seem to be in the right place. To be continued.
Seeing possible JS problem. Could be related to file_get_contents:
Loading failed for the
I don't know what this qkz35d thing is. Exploring further.
Turning to my live site (fkelly.org) and turning off css and js aggregation and on the view source for the built on site gallery I see the following js files being loaded:
script src="/drupal8/sites/all/libraries/juicebox/juicebox.js?qkz4ml" script src="/drupal8/modules/juicebox/js/juicebox_load.js?qkz4ml"
So, strange: am I not loading the proper sites/all/libraries/juicebox.js?
the juicebox.libraries.yml file on my fkelly.org site reads: juicebox: js: {} juicebox.local: js: js/juicebox_load.js: {} css: theme: component: css/juicebox_styles.css: {} dependencies:
Sundays (12/6/2020) commit changes this. But with this commit my sites/all/libraries/juicebox/juicebox.js file is not loading
I will wait comment rather than digging the hole deeper. I did a quick manual reversion to the above setup on my d9 local site for the file and that's not working either.
I was able to replicate your Gallery set up on my live site, which doesn't have ANY OF the recent Juicebox changes:
https://fkelly.org/drupal8/node/235
but sites/all/libraries/juicebox.js gets loaded there.
I think that what is happening is this:
when what we are calling a pre-built gallery is displayed, sites/all/libraries/juicebox/juicebox.js is loaded. Actually, juiceboxformatter allows the library to be in either /libraries or sites/all/libraries/juicebox and will build the libraries variable accordingly.
There is start embed code built that looks like this: --START JUICEBOX EMBED--><script src="//drupal8/sites/all/libraries/juicebox/juicebox.js
and that's what ensures the juicebox library js file gets loaded.
However, when the gallery is built directly on the web site I don't think this code gets invoked. So the juicebox.js is never loaded.
The old contrib libraries module had some functions to load the library. See functions libraries_load and libraries_load_files in the libraries_module program in the contrib module libraries. In removing the contrib module dependency I think I missed that. It didn't matter for my testing because I only used pre-built libraries.
We certainly don't want to regress to depending on the contrib libraries module or replicating its code. Two options that I could see are:
2, See if we can duplicate the code that embeds a pre-built gallery to insert the START JUICEBOX EMBED code whenever use of the Juicebox Formatter is detected from the manage display screen.
Comments welcome. I'm going to look into the EMBED option first.
Frank
So START JUICEBOX EMBED .... is actually "embedded" in the source code of the Juicebox Gallery content type content item. And the link to the juicebox js. is actually hardcoded there. This was based, I dimly recall, on the embed instructions on the Juicebox.net web site ... the same people who provide the javascript code. I've always had a nagging feeling that this was an inflexible way to do things, because (a) you had to repeat this for every content item and (b) if the location of the file ever changed you'd need to go in and edit the source view of every item (in the body field of the item). But it does get the javascript code loaded.
Wow. This is probably a terrible solution but ... take a look ... I was looking thru the Drupal documentation and saw something about using a twig file to embed a load of JS. When we build a juicebox content item on the site, we use the file:
juicebox_embed_markup_html.twig that is in the templates directory.
So, locally I changed it to add (I won't quote the whole thing):
.... `<div{{ attributes }}>
{{ title_suffix }}
How about this issue? I mean its status. 1) Does 'juicebox.js include fix' solve it? 2) How about the mess with image styles. Did you sorted out? If everything's fine let's close this issue. Otherwise it needs more work.
For reference see: https://www.drupal.org/node/2164863 and https://www.drupal.org/node/2000300#managing-image-styles
This may or may not relate to "regression" I may be seeing. I'm not sure. But basically the problem I am seeing is that when I create a content type or content types to contain juicebox formatted images the images are not being stored or found correctly.
Let's say you create a content type for so-called juicebox images. Add a body field and a couple of image fields. On the manage display for the image fields in the Format column pick Juicebox Gallery. You'll get a gear icon to the right and the ability to pick various image styles. These are configured in config/media/image styles. So you pick one, or create one. Cool. But what I'm seeing is that Drupal is creating the new image styles in sites/default files/testing location/public/core/modules/image/image.png
where image.png is an image that corresponds to the specs (pixel dimensions etc.) of the style you created. This is nuts. I'm not sure it relates at all to the work we are doing on juicebox. But, when you create a content type item using this setup the image file gets "lost". I am trying to track this down. I can see sort of the same thing happening on my live site that doesn't have any of these recent juicebox module changes ... i.e., the creation of the /public/core/modules/image branch of the path.
Looking further: the thumbnail version of the file does seem to get created correctly in /sites/default/files/styles/gallery_thumbnail but the full file just gets stuffed in sites/default/files/"myfilename.jpg" and not in the correct styles subdirectory. Instead looking at view source I can see that Drupal is looking for the file in "sites/default/files/styles/max_650x650/public/2020-12 /20151101_133244.jpg" Since I had that style initially selected for the image in manage display area of the content type. In short Drupal is putting the file in the wrong place. I suspect that in the database the path to the file is correct (where it SHOULD BE). Now going to try the juicebox adaptive image style per the documentation above.
And after swapping the style over to the juicebox adaptive image style the content item says it's sticking the file in: "sites/default/files/styles/max_650x650/public/2020-12/20151101_132740.jpg. And, even after deleting the file from the content item and verifying that I have switched in the manage display area over to the adaptive image style the link to the file keeps being in the max_650_650 style directory. Very strange. For kicks I was going to make a copy of the file in the directory where Drupal thinks it lives (public/2020-12/) but Drupal hasn't even created such directories ... beneath max_650x650 on my file system there is a /core/modules/image path. Nuts to this.