Jump to content
FWR Media

ULTIMATE Seo Urls 5 - by FWR Media

Recommended Posts

Hello, in OSCOM Phoenix v.1.0.4.1 I am getting the following error 

Fatal error: Cannot declare class Product_Info_Page_Module, because the name is already in use in /xxx/xxx/xxx/includes/modules/ultimate_seo_urls5/page_modules/product_info.php on line 225

whereas everything functioned fine in OSCOM Phoenix v.1.0.4.0. Any ideas ?

Thanks

Share this post


Link to post
Share on other sites
1 hour ago, artfulweb said:

Any ideas ?

Conflict with how the autoloader works?  If line 225 is an include or require, try deleting it.  Or post that section of code and tell us which line is 225 for more specific advice. 


Always back up before making changes.

Share this post


Link to post
Share on other sites
On 12/22/2019 at 4:09 PM, ecartz said:

Conflict with how the autoloader works?  If line 225 is an include or require, try deleting it.  Or post that section of code and tell us which line is 225 for more specific advice. 

Actually this is line 225 :

  } // end class

 

and all that prececeeds it is :

    private function linkTextOrder( array $details = array() ) {
      $text_types = array( 'p' => $details['products_name'], 'c' => $details['categories_name'], 'm' => $details['products_model'] );
      // manufacturers_name is gained through a left join and may not exist
      array_key_exists( 'manufacturers_name', $details ) ? $text_types['b'] = $details['manufacturers_name'] : null;
      // Products name MUST be present, if not we force it to the end
      if ( false === stripos( USU5_PRODUCTS_LINK_TEXT_ORDER, 'p' ) ) {
         $admin_order = str_split( USU5_PRODUCTS_LINK_TEXT_ORDER . 'p' );
      } else $admin_order = str_split( USU5_PRODUCTS_LINK_TEXT_ORDER );
      // Split the string value entered in admin ( like mcp etc ) to an array
      $text_order = array_flip( $admin_order ); // Flip key => value to value => key
      $text_to_format = array_intersect_key( $text_types, $text_order ); // return only those key => value pairs that match the admin selection
      $link_text_count = count( $admin_order );
      $ordered_array = array();
      for ( $i=0; $i<$link_text_count; $i++ ) {
      if ( ( array_key_exists( $admin_order[$i], $text_to_format ) && tep_not_null( $text_to_format[$admin_order[$i]] ) ) ) { // If a value is empty then we don't want to add it to the link text
          $to_seperate[] = $text_to_format[$admin_order[$i]]; // Create an array where the  link text is in the same order as the admin selection
        }
      }
      return $to_seperate;  
    } // End method

  } // end class

 

which makes no sense to me as I do not see Product_Info_Page_Module in it ! On the other hand the file begins with

  class Product_Info_Page_Module extends aPage_Modules {
 

Share this post


Link to post
Share on other sites
On 12/27/2019 at 11:23 AM, ecartz said:

@artfulweb are you using revision 205 from this link?  Or which version are you using? 

Sorry Matt, our phone line came down so no internet! I will try that version and get back to you.

Share this post


Link to post
Share on other sites

OK Matt, the one from the link is a total disaster on Phoenix 1.0.4.1, php 7.38 with all the undefined constants, "uncaught errors" and the original error I posted so looks like I have to abandon this. Too bad because I had great standings in Google with my websites! 

Share this post


Link to post
Share on other sites
28 minutes ago, artfulweb said:

OK Matt, the one from the link is a total disaster on Phoenix 1.0.4.1, php 7.38 with all the undefined constants, "uncaught errors" and the original error I posted so looks like I have to abandon this. Too bad because I had great standings in Google with my websites! 

On 8/15/2018 at 3:42 PM, piernas said:

@phi148 I think I fixed the issue. Can you please test it?

 

Ultimate_Seo_Urls_5_PRO_BS_209_beta_2.zip

You should try this version:

If it still throws errors, contact the maintainer @piernas if he can update it for Phoenix 1.0.4.1.

 

Share this post


Link to post
Share on other sites

Hello Rainer, I just uninstalled so need a little time to reinstall and will get right back to you, thanks.

Share this post


Link to post
Share on other sites

Alas Rainer still the error :

Fatal error: Cannot declare class Product_Info_Page_Module, because the name is already in use in /xxx/xx/xxx/xx/includes/modules/ultimate_seo_urls5/page_modules/product_info.php on line 212

Share this post


Link to post
Share on other sites

hi there,

I have an issue with USU5: in fact, hreflang tags are not rewritten correctly: the special characters are not converted in the hrefland alternate language links (canonical and url are ok).

Any ideas?

Thanks

ps: you can use this link to check the source code: https://www.babouche-maroc.com/es/te-marroqui-gafas-c-45.html and view-source:https://www.babouche-maroc.com/es/te-marroqui-gafas-c-45.html

 

Share this post


Link to post
Share on other sites

Sorted out: needed to add the conversions to the other languages files. Eg: 'ó' => 'o' to french.php file even if this is not a french character...was resolved that way

Share this post


Link to post
Share on other sites

Hello everybody.

Does anyone have any idea on how to install the latest Ultimate_Seo_Urls_5_PRO_BS_209_beta_2.zip on Phoenix 1.0.7.4 or 1.0.7.5?

I have tried but the installation instructions appear to be fairly clumsy, to say the least: code in the "compare_files" is completely different than the most recent one and uploading only those files inside the "drop_on_top" folder does not actually do....

Share this post


Link to post
Share on other sites
On 7/13/2020 at 12:03 AM, mendoh said:

Hello everybody.

Does anyone have any idea on how to install the latest Ultimate_Seo_Urls_5_PRO_BS_209_beta_2.zip on Phoenix 1.0.7.4 or 1.0.7.5?

I have tried but the installation instructions appear to be fairly clumsy, to say the least: code in the "compare_files" is completely different than the most recent one and uploading only those files inside the "drop_on_top" folder does not actually do....

To whom this may concern:

 

the latest Ultimate Seo Urls 5 PRO  for Phoenix 1.0.7.4 or 1.0.7.5 can be found here:  

 

Do not install Ultimate_Seo_Urls_5_PRO_BS_209_beta_2.zip on Phoenix 1.0.7.4 or 1.0.7.5 as it just will NOT work. 

 

 

Share this post


Link to post
Share on other sites
Posted (edited)
On 8/8/2020 at 4:36 PM, mendoh said:

To whom this may concern:

The latest Ultimate Seo Urls 5 PRO  for Phoenix 1.0.7.4 or 1.0.7.5 can be found here: 

This is not the same addon (Seo URLS 2.1 vs SEO Urls 5 Pro). I've had not much time lately but I was trying to adapt it to the latest phoenix. Its way to add code to the application is very different and I'll need more time to make it work without core code changes.

Edited by piernas

Share this post


Link to post
Share on other sites
32 minutes ago, piernas said:

This is not the same addon (Seo URLS 2.1 vs SEO Urls 5 Pro). I've had not much time lately but I was trying to adapt it to the latest phoenix. Its way to add code to the application is very different and I'll need more time to make it work without core code changes.

Thanks for your clarifications. 

I can only confirm that installing Ultimate_Seo_Urls_5_PRO_BS_209_beta_2.zip on Phoenix 1.0.7.4 or 1.0.7.5/6 will definitely NOT work. 

Share this post


Link to post
Share on other sites
33 minutes ago, piernas said:

Its way to add code to the application is very different and I'll need more time to make it work without core code changes.

You might take a look at how KISS IT Image Thumbnailer does it for overriding images.  Because links work the same way. 


Always back up before making changes.

Share this post


Link to post
Share on other sites
7 hours ago, ecartz said:

You might take a look at how KISS IT Image Thumbnailer does it for overriding images.  Because links work the same way. 

Thanks I'll do as soon as I have the time. I have to dig on how application_top is being processed to see where I must inject the code.

Share this post


Link to post
Share on other sites

Hi everyone,

Hope all is well. Was trying to update Phoenix to 1.0.7.7, but due to USU5 Pro limitation, I had to stop at V. 1.0.7.2. I think it is not possible to go beyond 1.0.7.3 version while keeping the same USU5 module (language class removed in 1.0.7.3). Really like USU5 pro as it provides multi language support, which I beleive is the only addon to provide it. 

@piernas would be very very very grateful if you can find time to update this addon to the latest Phoenix version.

Thanks

Share this post


Link to post
Share on other sites
14 minutes ago, marokech said:

Hi everyone,

Hope all is well. Was trying to update Phoenix to 1.0.7.7, but due to USU5 Pro limitation, I had to stop at V. 1.0.7.2. I think it is not possible to go beyond 1.0.7.3 version while keeping the same USU5 module (language class removed in 1.0.7.3). Really like USU5 pro as it provides multi language support, which I beleive is the only addon to provide it. 

@piernas would be very very very grateful if you can find time to update this addon to the latest Phoenix version.

Thanks

There's been deep changes that affect the way it is loaded. I also figured out a fix for files not in the main directory but I'll still have to test it deeply. I have to find some time to test it but currently I have no free time. I hope next month I'll find it.

Share this post


Link to post
Share on other sites

@piernas muchas gracias hombre! you are a star!!! :)

I'm not a programmer, but if you need some help in testing it, would be my pleasure

Edited by marokech

Share this post


Link to post
Share on other sites
19 minutes ago, marokech said:

while keeping the same USU5 module (language class removed in 1.0.7.3)

The language class may have been moved, but it is unlikely it was removed.  If that were the one and only problem, it could presumably be fixed if you explained what the actual problem was. 

If it's that there is code that you used to add immediately after the language code, then you can just move it into the i() function.  Change

     if ( !self::$_singleton instanceof Usu_Main ) {
       self::$_singleton = new self;
     }

to

     if ( !self::$_singleton instanceof Usu_Main ) {
       self::$_singleton = new self();
       global $lng;
       self::$_singleton->setVar( 'languages_id', $_SESSION['languages_id'] )
               ->setVar( 'request_type', $GLOBALS['request_type'] ) 
               ->setVar( 'session_started', $GLOBALS['session_started'] ) 
               ->setVar( 'sid', $GLOBALS['SID'] ) 
               ->setVar( 'language', $_SESSION['language'] )
               ->setVar( 'filename', $GLOBALS['PHP_SELF'] )
               ->initiate( ( isset( $lng ) && ( $lng instanceof language ) ) ? $lng : [], $_SESSION['languages_id'], $_SESSION['language'] );
     }

And you can add the other change to includes/classes/application.php -- find

      $_SESSION['navigation']->add_current_page();

and add after it

  if (USU5_MULTI_LANGUAGE_SEO_SUPPORT == 'true') {
    include_once 'includes/modules/ultimate_seo_urls5/includes/hreflang.php';
    global $lng;
    $GLOBALS['usu5_multi'] = new FWR_hreflang( $_SESSION['navigation'],  $_SESSION['language'],  (isset( $lng ) && ( $lng instanceof language ) ) ? $lng : [], $GLOBALS['session_started'] );
  }

That's not the ideal solution, but it should get you around your immediate problem. 

A better solution would rename the file and/or class so that the autoloader would load it (no more include_once).  And create a no-arg factory method for it that could be called from a hook.  Then you wouldn't need to make a core edit.  But if the only thing keeping you from using this App is that you can't find the code to edit in application_top.php, there it is.  Presumably something like this is part of what piernas needs to test. 


Always back up before making changes.

Share this post


Link to post
Share on other sites

Thank you @ecartz

Yes exact, "moved" was the right word indeed. Thas is one issue, but there are certainly others (will check hreflang...). Will test your solution, and let you know if I can move forward beyond V1.0.7.2

Cheers

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×