Hello romanf,
With theme Stripped, on the page of the photo (ie picture.php) I get this javascript error in the console:
ReferenceError: MRP_blockHeight is not defined
... and the picture is not shown at all (because it relies on javascript)
Piwigo version: 2.9.0
Theme : Stripped 2.5.7
PHP version: 5.6.14
MySQL version: 5.5.46
Offline
Hi plg,
I can't reproduce it. Does it work on other themes?
The JS in MenuRandomPhoto consists of two parts: menu_random_photo.js.tpl which get's expanded by the template engine (and contains the definition of MRP_blockHeight, amongst others) and mrp.js which handles the rotation of the pics via timer...
Can you look at the source of the page and check for
...
var MRP_blockHeight=
...
and
...
function doRotate()
...
Thanks
Roman
Offline
Hi romanf,
The problem does not seem to be for Stripped theme. I reproduce it with Elegant theme as well.
Go on page [Administration > Configuration > Options > Display] and check the option "show menubar" in the "Photo page" section. You will get the error in your browser console.
Offline
Heya,
I uploaded a new version of the plugin. Apart from the new feature, it should also fix the problem you reported.
Feedback very much welcome! :)
Rgds
Roman
Offline
Hi romanf,
Just made the test with version 2.8.0 of Menu Random Photo and still the same issue. Don't you reproduce it?
Offline
I did a clean install and could not reproduce it. :(
-Roman
Offline
Hi romanf,
I've pushed 2 commits on SVN :
1) fix bug on the picture page displaying the menubar
2) automatically disable MenuRandomPhoto on SmartPocket
Please review and push a new version of the plugin :-)
Offline
Actually, I also see a problem on Stripped + option menubar on picture page. Fixing it.
Offline
And there's a major issue with upgrade system. All users who have updated from 2.7.x to 2.8.0 version have not applied the new database changes. I'm pretty sure it's because file maintain.inc.php should be renamed maintain.class.php.
Offline
When adding a new configuration setting to a plugin, you should follow this pattern [Github] Piwigo-Skeleton file maintain.class.php@L52 :
$old_conf = safe_unserialize($conf['skeleton']); if (empty($old_conf['option3'])) { // use case: this parameter was added in a new version $old_conf['option3'] = 'two'; } conf_update_param('skeleton', $old_conf, true);
Or else the user will always have to restore the plugin (and lose all current settings).
Offline
OK, I pushed 2 new commits to implement the auto-update mechanism. Now in your function getRandomPictures, you should not need this test any longer:
if (!isset($conf['MRP']['apply_to_albums']))
Please make some tests and I think you can publish a version 2.8.1 :-) (I'm going to push this on Piwigo.com, considering many users have the message:
MenuRandomPhoto seems not to be installed/configured properly. Please remove and reinstall.
Offline
Thanks for all your work! It's very much apreciated.
I published the SVN/HEAD as 2.8.1.
Cheers
Roman
Offline
Hi,
I just encountered still the same problem with version 2.8.1 : Stripped + MenuRandomPhoto 2.8.1 + option "show menu" on photo page.
Offline
Heya,
plg wrote:
I just encountered still the same problem with version 2.8.1 : Stripped + MenuRandomPhoto 2.8.1 + option "show menu" on photo page.
The variable MRP_blockHeight gets defined in menu_random_photo.js.tpl which in term should get loaded from main.inc.php.
I don't see why it is loaded sometimes and sometimes not... :-(
Hard to debug as I can still not reproduce it.
-Roman
Offline
Hi romanf,
I can easily reproduce : theme Stripped + option "show menu" on photo page [Administration > Configuration > Options > Display] + MenuRandomPhoto
I have pushed a new commit http://piwigo.org/dev/changeset/31891 to fix it
Offline