Hello
after making the progress of php 7.1.9
I received a bug in theme.inc
three warning for each result...
-
Warning: Illegal string offset 'md_row_height_flag' in template_preprocess_md_portfolio_mdp_plugin_rows() (linea 348 di /sites/all/modules/md_portfolio/templates/mdp/theme.inc).
-
Warning: Illegal string offset 'md_row_height' in template_preprocess_md_portfolio_mdp_plugin_rows() (linea 352 di /sites/all/modules/md_portfolio/templates/mdp/theme.inc).
-
Warning: Illegal string offset 'md_row_height_flag' in template_preprocess_md_portfolio_mdp_plugin_rows() (linea 360 di /sites/all/modules/md_portfolio/templates/mdp/theme.inc).
the code in question is this:
$md_data['options'] = $options;
if (!isset($md_data['options']['md_row_height_flag'])) {
$md_data['options']['md_row_height_flag'] = '1'; // LINE 348
}
if (!isset($md_data['options']['md_row_height'])) {
$md_data['options']['md_row_height'] = 300; // LINE 352
}
$wdt_json = drupal_json_encode($md_data['options']);
drupal_add_js(array(
'md_row' => $wdt_json,
), array('type' => 'setting'));
// LINE 360 ↓
if ($md_data['options']['md_row_height_flag'] == '0') {
$row_style = 'style="height: ' . $md_data['options']['md_row_height'] . 'px;"';
}
else {
$row_style = '';
}
Is it possible to adjust with a PATCH?
thank you
Franceso
Hi,
Are you using the latest version? Please update the newest one
https://megadrupal.com/user/francescor
Hello Cindy,
I installed the latest version but the error persists, it has just moved four rows!
Warning: Illegal string offset 'md_row_height_flag' in template_preprocess_md_portfolio_mdp_plugin_rows() (line 352 of /sites/all/modules/md_portfolio/templates/mdp/theme.inc).
Warning: Illegal string offset 'md_row_height' in template_preprocess_md_portfolio_mdp_plugin_rows() (line 356 of /sites/all/modules/md_portfolio/templates/mdp/theme.inc).
Warning: Illegal string offset 'md_row_height_flag' in template_preprocess_md_portfolio_mdp_plugin_rows() (line 364 of /sites/all/modules/md_portfolio/templates/mdp/theme.inc).
P.S. if it can help
after upgrade from php 5 to 7 I received other errors from other modules, fixing with patches from the drupal community
example
https://www.drupal.org/node/2865906
https://www.drupal.org/node/2843367
thanks for support.
Francesco.
Hi,
Please send us your website url, admin and FTP account account to check this issue
Hi Cindy,
I installed the module on an online site and I created an ftp account:
PS in Load Content: Full page
the photobox module gallery images and audio sound manager 2 player no longer works,
i think i do not load javascript .... do you know how i can solve it?
Thanks again.
Francesco.
Hi,
We fixed your issue already
Please check
Thank you for solving the problem!
there is a way to work audio sound-manager2 and photobox image player
within md portfolio in full page view?
how can I fix it?
Thanks for all.
Hi,
We check and see that you used css and js library for sound-manager2 and photobox image player already.
Now you need to change html structure or add script which runs sound-manager2, photobox.
When you click the link to show detail portfolio page, your website will call ajax to load the node content
function callback is md_portfolio_load_content, you can add js to variable $content_view
If you want to change html structure. you can follow the instruction above or override file template node.tpl.php properly
Hi Cindy
I added the .js and .css libraries using the md_portfolio_library function
the problem with sound-manager2 is resolved.
However, the issue with the photobox persists, in the header there are the two js
jquery.photobox.js
photobox.js
with firebug I noticed that DOM is not modified by jquery.photobox.js as it does with the node, so i assume jquery.photobox.js does not run properly.
I tried in many ways but I did not solve it!! I do not have the necessary skills.
you could kindly help me, the solution should not be far away!
Thank you again
Hi,
jQuery only selects DOM of the page when that page is completely loaded. Other DOMs, which are added after loading page, are only selected if you call function jquery one more time, (usually when ajax is fully loaded.)
As we mentioned above, you can add js to function md_portfolio_load_content
Now, we fixed your issue already
Please check!
Hi Cindy,
I saw your change to md portfolios load content!
Thanks a lot, now it's perfect.
"May the Force be with you"
Hi there,
could you be so kind and make the solution to this problem public? I'm getting the same error and would love to see the actual patch here. Best, Jesko