Warning: The author of this contribution does not provide support for it anymore.

phpBB Gallery

3.0.12-RC3 breaks gallery install... - phpBB Gallery

3.0.12-RC3 breaks gallery install...

by Master_Cylinder » Thu Sep 19, 2013 5:56 am

I know it's not released yet but, if you haven't noticed, 3.0.12RC* changes the code in ucp.php by removing the "find" code (line 125) in 3.0.12RC2 and RC3 (so far) breaking the install:

Code: Select all

// Do not display signature panel if not authed to do so
if (!$auth->acl_get('u_sig'))
{
   $module->set_display('profile', 'signature', false);
}


I just put the above find code back in ucp.php and the installer continued after that. You could use an add before or change the add after but fixing this allows it to install at least. I hope you plan to update after 3.0.12 is released...or before. ;)


M_C
Master_Cylinder
Registered User
Posts: 761
Joined: Wed Jun 26, 2013 10:14 pm

Re: 3.0.12-RC3 breaks gallery install...

by Master_Cylinder » Sun Sep 29, 2013 4:53 am

3.0.12 has been released, I hope we see a new version of the mod to go with it soon... :D
Master_Cylinder
Registered User
Posts: 761
Joined: Wed Jun 26, 2013 10:14 pm

Re: 3.0.12-RC3 breaks gallery install...

by 5hocK » Sun Sep 29, 2013 4:08 pm

I installed it like this for 3.0.12
In ucp.php
Find:

Code: Select all

// Do not display subscribed topics/forums if not allowed
if (!$config['allow_topic_notify'] && !$config['allow_forum_notify'])
{
   $module->set_display('main', 'subscribed', false);
}

Add after:

Code: Select all

if (class_exists('phpbb_gallery_integration'))
{
   phpbb_gallery_integration::ucp($module);
}

I unzipped phpbb_gallery_1_1_6.zip, edited install.xml, zipped it back up and installed with automod.
No errors :)
A thread is pretty much a topic. Stop with the pedantics will ya.
User avatar
5hocK
Registered User
Posts: 3011
Joined: Wed Nov 23, 2011 7:00 pm
Location: England

Re: 3.0.12-RC3 breaks gallery install...

by Master_Cylinder » Sun Sep 29, 2013 8:37 pm

Yeah, or you could:
Find:

Code: Select all

// Select the active module
$module->set_active($id, $mode);

and then add before. ;)

I still have problems but it could be other mods. When I install gallery all of the posts go server error: 500 but I can view forums and other pages. The ACP looks odd too but I don't have a screen shot right now. I haven't had time to look for a solutions, it's probably something simple that I'm just not noticing.
Master_Cylinder
Registered User
Posts: 761
Joined: Wed Jun 26, 2013 10:14 pm

Re: 3.0.12-RC3 breaks gallery install...

by 5hocK » Sun Sep 29, 2013 9:42 pm

Master_Cylinder wrote:Yeah, or you could:
Find:

Code: Select all

// Select the active module
$module->set_active($id, $mode);


and then add before.

You can sure, but it won't install with automod if you edit the file (unless you force the install) if you modify the actual download it installs with no errors.
http://s20.postimg.org/b8l3eraf1/gal1.png
http://s20.postimg.org/70qb608zh/gal2.png
A thread is pretty much a topic. Stop with the pedantics will ya.
User avatar
5hocK
Registered User
Posts: 3011
Joined: Wed Nov 23, 2011 7:00 pm
Location: England

Re: 3.0.12-RC3 breaks gallery install...

by Master_Cylinder » Sun Sep 29, 2013 9:52 pm

It's the same thing that you did to ucp.php only with different finds and add before instead of add after. ;)

Yeah, I got it to install with automod and it reported success but, as I said, the topics disappear and ACP looks like it's not finding what it needs so I uninstalled the mod. (I'll post screenshots later and maybe start a new thread for the other issues)
Master_Cylinder
Registered User
Posts: 761
Joined: Wed Jun 26, 2013 10:14 pm

Re: 3.0.12-RC3 breaks gallery install...

by 5hocK » Mon Sep 30, 2013 7:26 am

Master_Cylinder wrote:It's the same thing that you did to ucp.php only with different finds and add before instead of add after

Once again yes :) Just not edited manually, anyway, the gallery work with 3.0.12 :D
A thread is pretty much a topic. Stop with the pedantics will ya.
User avatar
5hocK
Registered User
Posts: 3011
Joined: Wed Nov 23, 2011 7:00 pm
Location: England

Re: 3.0.12-RC3 breaks gallery install...

by Master_Cylinder » Mon Sep 30, 2013 7:59 pm

Hopefully, nickv will update the install.xml and release a new version so other people don't have to. ;)

I got it installed via automod, after editing the files it complained about, but it's not working for me. I do have a lot of MODs installed so I need to figure out what breaks what eventually. Right now gallery breaks all of the posts/topics and uninstalling it fixes the problem. I just haven't made time to work on that. I did notice that uninstalling gallery left a lot of trash that I've been dealing with manually for now. I'll have to go through the install.xml and make sure all of the changes were removed. Hopefully, by then, we might have a new version that doesn't give me error 500 on all of the posts when installed.

This thread isn't about that though, I just wanted nickv to know about the changes in ucp.php (if he didn't already know) so he could change that find in the install.xml that's no longer there. I still think using add before would be better so it'll still work on .11 and older too. ;)

YMMV...
Master_Cylinder
Registered User
Posts: 761
Joined: Wed Jun 26, 2013 10:14 pm

Re: 3.0.12-RC3 breaks gallery install...

by petereeles » Tue Oct 08, 2013 12:49 pm

Master_Cylinder wrote:Hopefully, nickv will update the install.xml and release a new version so other people don't have to. ;)


Indeed. Given the lack of response here, I posted in the support forum:

viewtopic.php?f=46&t=2203106

... where I asked "Can anyone let me know what users of the gallery mod are supposed to do? Are we supposed to figure out how to upgrade the mod ourselves for the latest phpBB releases? I simply want to know so that I can make an informed decision on what to do.".

The response is:

"If you are experiencing problems with the MOD and the MOD author is unresponsive then uninstall it. However, problems with MODs are most often caused by user errors in installing them."

Helpful eh? :(

- Pete
petereeles
Registered User
Posts: 151
Joined: Wed Jan 18, 2006 9:43 pm

Re: 3.0.12-RC3 breaks gallery install...

by 5hocK » Tue Oct 08, 2013 1:00 pm

There's only one difference though - in ucp.php, between 3.0.11 and 3.0.12
3.0.11 has // Do not display signature panel if not authed to do so
and 3.0.12 does not.
It's not even code.
A thread is pretty much a topic. Stop with the pedantics will ya.
User avatar
5hocK
Registered User
Posts: 3011
Joined: Wed Nov 23, 2011 7:00 pm
Location: England

Re: 3.0.12-RC3 breaks gallery install...

by Master_Cylinder » Tue Oct 08, 2013 6:30 pm

5hocK wrote:There's only one difference though - in ucp.php, between 3.0.11 and 3.0.12
3.0.11 has // Do not display signature panel if not authed to do so
and 3.0.12 does not.
It's not even code.

The missing find is why I started this thread so nickv could fix the install.xml for the new phpBB version and that's exactly why the add-before would be better than an add-after.

Your add-after code would put the inserted code *before* the "signature panel" section, in .11, instead of after as it is now.

The add-before "// Select the active module" solution that I suggested would put the inserted code in the right place for .11 or .12 but maybe he won't care about backwards compatibility and either would work the same.
Master_Cylinder
Registered User
Posts: 761
Joined: Wed Jun 26, 2013 10:14 pm

Re: 3.0.12-RC3 breaks gallery install...

by 5hocK » Tue Oct 08, 2013 7:30 pm

My post was for petereeles - just pointing out that there has been no code changes in the update to 3.0.12 that affects the MOD, although he wants to here this from Nick.
The easy way is to install on a fresh board (install automod though) and see for yourself where it fails.

FTR: My way or your way has the same effect, either/Eyether (sic) ;)
Your original way was this by the way
Master_Cylinder wrote:I just put the above find code back in ucp.php
A thread is pretty much a topic. Stop with the pedantics will ya.
User avatar
5hocK
Registered User
Posts: 3011
Joined: Wed Nov 23, 2011 7:00 pm
Location: England

Re: 3.0.12-RC3 breaks gallery install...

by Master_Cylinder » Tue Oct 08, 2013 7:53 pm

No, you misunderstand and you left out the next part of my quote:
You could use an add before or change the add after


In the first post I was just reporting that the required find is missing and that *I* added it back to the ucp.php to install the MOD. I did not suggest that nickv use that to fix the install.xml. I suggested that he change the install.xml to an add-before or change the add-after but, clearly, the add-after that you suggest would insert the needed code in the wrong place for .11 now.

Both of the solutions would work for .12 but the add-before solution that I suggested:
Find:

Code: Select all

// Select the active module
$module->set_active($id, $mode);

and then add before.

is better for .11 than the add-after that you suggested.

Look for yourself; compare .11 and .12 with your install.xml with the new add-after and mine with the new add-before. the .12 install will be the same but the .11 install will be different. The add-before solution matches what we would have now for .11 but it would work on .12 too.
Master_Cylinder
Registered User
Posts: 761
Joined: Wed Jun 26, 2013 10:14 pm

Re: 3.0.12-RC3 breaks gallery install...

by Master_Cylinder » Tue Oct 08, 2013 8:14 pm

Here, let me make it easy for everyone:

Current 1.1.6 Gallery install.xml:

Code: Select all

      <open src="ucp.php">
         <edit>
            <find><![CDATA[// Do not display signature panel if not authed to do so
if (!$auth->acl_get('u_sig'))
{
   $module->set_display('profile', 'signature', false);
}]]></find>
            <action type="after-add"><![CDATA[
if (class_exists('phpbb_gallery_integration'))
{
   phpbb_gallery_integration::ucp($module);
}]]></action>
         </edit>
      </open>

(1.1.6 works in .11 but not .12 (without editing))


5hock's suggested add-after install.xml:

Code: Select all

      <open src="ucp.php">
         <edit>
            <find><![CDATA[    // Do not display subscribed topics/forums if not allowed
    if (!$config['allow_topic_notify'] && !$config['allow_forum_notify'])
    {
       $module->set_display('main', 'subscribed', false);
    }]]></find>
            <action type="after-add"><![CDATA[
if (class_exists('phpbb_gallery_integration'))
{
   phpbb_gallery_integration::ucp($module);
}]]></action>
         </edit>
      </open>

(Works for .12 but changes .11)


My suggested add-before install.xml:

Code: Select all

      <open src="ucp.php">
         <edit>
            <find><![CDATA[// Select the active module
$module->set_active($id, $mode);]]></find>
            <action type="before-add"><![CDATA[
if (class_exists('phpbb_gallery_integration'))
{
   phpbb_gallery_integration::ucp($module);
}]]></action>
         </edit>
      </open>

(Works in .12 *and* no change for .11)

Check it out... ;)
Master_Cylinder
Registered User
Posts: 761
Joined: Wed Jun 26, 2013 10:14 pm

Re: 3.0.12-RC3 breaks gallery install...

by 5hocK » Tue Oct 08, 2013 8:22 pm

No need, I know it's right (your way) never said it was wrong - just that they both work for 3.0.12, your way is better for both as it's backwards compatible.
My post, as stated, was for petereeles regarding
Can anyone let me know what users of the gallery mod are supposed to do? Are we supposed to figure out how to upgrade the mod ourselves for the latest phpBB releases?

and was not about how to update, but why it's ok to update (there's no code change)
A thread is pretty much a topic. Stop with the pedantics will ya.
User avatar
5hocK
Registered User
Posts: 3011
Joined: Wed Nov 23, 2011 7:00 pm
Location: England