Jump to content
Announcing Achievements! ×

Community

teraßyte

+Clients
  • Posts

    31,890
  • Joined

  • Days Won

    11

teraßyte last won the day on October 1 2012

teraßyte had the most liked content!

About teraßyte

  • Birthday 12/18/1986

IPS Marketplace

  • Resources Contributor
    Total file submissions: 30

Recent Profile Visitors

22,999 profile views

teraßyte's Achievements See all achievements

Grand Master

Grand Master (13/13)

  • Very Popular Rare
  • Reacting Well Rare
  • Week One Done
  • One Year In
  • One Month Later

Recent Badges

1.9k

Reputation

12

Community Answers

  1. They can just make it a default template with a code option to change it if you need it to be different. They already do such thing for other templates in the suite already anyway; it's nothing new.
  2. Let me see what I can do about stripping it down to a simple application. The current one relies on having also other apps installed at the same time so you wouldn't be able to test with it alone.
  3. In system/Content/Search/Elastic/Index.php::resetLastComment() you have this code on lines 877-884: $where = NULL; if( $ignoreId !== NULL ) { $commentClass = $itemClass::$commentClass; $commentIdColumn = $commentClass::$databaseColumnId; $where = array( $commentClass::$databaseTable . '.' . $commentClass::$databasePrefix . $commentIdColumn . '<>?', $ignoreId ); } The problem is that one of my custom applications does not implement the \IPS\Content\Comment but only \IPS\Content\Review. The code above clearly doesn't check if the comments class is available before trying to load/use it. And the fix here is not to simply skip the ignore code if no Comment class is available, but it should be using the correct Comment/Review class based on the class data being passed to it. Here's a log of the error btw: Error: Class name must be a valid object or a string (0) #0 /home/domain.com/public_html/system/Content/Search/Elastic/Index.php(412): IPS\Content\Search\Elastic\_Index->resetLastComment(Array, 43058, 4048) #1 /home/domain.com/public_html/system/Content/Comment.php(883): IPS\Content\Search\Elastic\_Index->removeFromSearchIndex(Object(IPS\reviews\Product\Review)) #2 /home/domain.com/public_html/system/Content/Review.php(396): IPS\Content\_Comment->delete() #3 /home/domain.com/public_html/applications/reviews/sources/Generic/Item.php(1714): IPS\Content\_Review->delete() #4 /home/domain.com/public_html/system/Helpers/Table/Content.php(679): IPS\reviews\Generic\_Item->mergeIn(Array, false) #5 /home/domain.com/public_html/system/Helpers/Table/Content.php(227): IPS\Helpers\Table\_Content->multimod() #6 /home/domain.com/public_html/applications/reviews/modules/front/products/browse.php(108): IPS\Helpers\Table\_Content->__construct('IPS\\reviews\\Pro...', Object(IPS\Http\Url\Friendly), Array) #7 /home/domain.com/public_html/applications/reviews/modules/front/products/browse.php(35): IPS\reviews\modules\front\products\_browse->_category(Object(IPS\reviews\Pcategory)) #8 /home/domain.com/public_html/system/Dispatcher/Controller.php(96): IPS\reviews\modules\front\products\_browse->manage() #9 /home/domain.com/public_html/system/Dispatcher/Dispatcher.php(152): IPS\Dispatcher\_Controller->execute() #10 /home/domain.com/public_html/index.php(13): IPS\_Dispatcher->run() #11 {main} The issue above happens with Elastic Search, but most likely the normal MySQL search has the same issue.
  4. Let me throw in a quick reminder for IPS to update also the Review class too if they ever get to this (since it often gets forgotten)...
  5. I've noticed a recurring template_error logged in ACP, after looking into it some more it seems to be thrown when someone replies to a status update on a profile and ES tries to index it. Here's the message and backtrace: TypeError: Argument 1 passed to IPS\Content\Search\Elastic\_Index::getIndexId() must implement interface IPS\Content\Searchable, instance of IPS\core\Statuses\Reply given, called in /public_html/system/Content/Search/Elastic/Index.php on line 888 and defined in /public_html/system/Content/Search/Elastic/Index.php:403 Stack trace: #0 /public_html/system/Content/Search/Elastic/Index.php(888): IPS\Content\Search\Elastic\_Index->getIndexId(Object(IPS\core\Statuses\Reply)) #1 /public_html/system/Content/Search/Elastic/Index.php(245): IPS\Content\Search\Elastic\_Index->resetLastComment(Array, 8206) #2 /public_html/system/Content/Item.php(4389): IPS\Content\Search\Elastic\_Index->index(Object(IPS\core\Statuses\Status)) #3 /public_html/system/Content/Item.php(4155): IPS\Content\_Item->processCommentForm(Array) #4 /public_html/uploads/template_disk_cache/template_3_5c14eba1ca1801cfb0f753db22fb4a43_statuses.php(664): IPS\Content\_Item->commentForm() #5 /public_html/system/Theme/SandboxedTemplate.php(61): IPS\Theme\Cache\class_core_front_statuses->statusContainer(Object(IPS\core\Statuses\Status), Array, Array, false) #6 /public_html/applications/core/sources/Statuses/Status.php(743): IPS\Theme\_SandboxedTemplate->__call('statusContainer', Array) #7 /public_html/system/Content/Search/Result/Content.php(94): IPS\core\Statuses\_Status::searchResult(Array, Array, Array, NULL, Array, NULL, true, 'expanded', false, false, NULL, Array) #8 /public_html/uploads/template_disk_cache/template_3_af46883c13caa197f9e387620d19e6ec_profile.php(2506): IPS\Content\Search\Result\_Content->html() #9 /public_html/system/Theme/SandboxedTemplate.php(61): IPS\Theme\Cache\class_core_front_profile->profileActivity(Object(IPS\Member), Object(IPS\Content\Search\Results), '\n<form accept-c...') #10 /public_html/applications/core/modules/front/members/profile.php(296): IPS\Theme\_SandboxedTemplate->__call('profileActivity', Array) #11 /public_html/system/Dispatcher/Controller.php(96): IPS\core\modules\front\members\_profile->manage() #12 /public_html/applications/core/modules/front/members/profile.php(73): IPS\Dispatcher\_Controller->execute() #13 /public_html/system/Dispatcher/Dispatcher.php(152): IPS\core\modules\front\members\_profile->execute() #14 /public_html/index.php(13): IPS\_Dispatcher->run() #15 {main} #0 /public_html/system/Theme/SandboxedTemplate.php(71): IPS\_Log::log(Object(TypeError), 'template_error') #1 /public_html/applications/core/sources/Statuses/Status.php(743): IPS\Theme\_SandboxedTemplate->__call('statusContainer', Array) #2 /public_html/system/Content/Search/Result/Content.php(94): IPS\core\Statuses\_Status::searchResult(Array, Array, Array, NULL, Array, NULL, true, 'expanded', false, false, NULL, Array) #3 /public_html/uploads/template_disk_cache/template_3_af46883c13caa197f9e387620d19e6ec_profile.php(2506): IPS\Content\Search\Result\_Content->html() #4 /public_html/system/Theme/SandboxedTemplate.php(61): IPS\Theme\Cache\class_core_front_profile->profileActivity(Object(IPS\Member), Object(IPS\Content\Search\Results), '\n<form accept-c...') #5 /public_html/applications/core/modules/front/members/profile.php(296): IPS\Theme\_SandboxedTemplate->__call('profileActivity', Array) #6 /public_html/system/Dispatcher/Controller.php(96): IPS\core\modules\front\members\_profile->manage() #7 /public_html/applications/core/modules/front/members/profile.php(73): IPS\Dispatcher\_Controller->execute() #8 /public_html/system/Dispatcher/Dispatcher.php(152): IPS\core\modules\front\members\_profile->execute() #9 /public_html/index.php(13): IPS\_Dispatcher->run() #10 {main}
  6. I recall reading we should report bugs here now? Not 100% sure though... 🙄 Anyway, the task applications/core/tasks/clearincompletemembers.php is not properly cleaning up incomplete accounts for those who signed up with FB/Twitter/etc. We've noticed this issue for a while now, but today I had a better look at it and figured out the issue. The problem is caused by this code on line 54: foreach ( new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'core_members', array( array( '(name=? OR email=?)', '', '' ), array( '! (members_bitoptions2 & 16384 ) AND joined<? AND (last_visit=0 OR last_visit IS NULL)', \IPS\DateTime::create()->sub( new \DateInterval( 'PT1H' ) )->getTimestamp() ) ) ), 'IPS\Member' ) as $incompleteMember ) The query fails to load any row because the check last_visit=0 fails since the column in the DB contains the value NULL instead. I changed that bit of code to account for both values and the task is working as it should now: (last_visit=0 OR last_visit IS NULL) Full code: foreach ( new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'core_members', array( array( '(name=? OR email=?)', '', '' ), array( '! (members_bitoptions2 & 16384 ) AND joined<? AND (last_visit=0 OR last_visit IS NULL)', \IPS\DateTime::create()->sub( new \DateInterval( 'PT1H' ) )->getTimestamp() ) ) ), 'IPS\Member' ) as $incompleteMember )
  7. As per title ^. When using an area that has reviews enabled (like a File in Downloads) the NEWEST/MOST HELPFUL buttons are NOT available on mobile view. Some people have report it as a bug on our site, but since it's more feedback(?) I'm posting here.
  8. When running the support tool in ACP the guest caching is NOT cleared (since it now uses a different class \IPS\Output\Cache). This causes the old CSS/JS files to be deleted and regenerated but the guest-cached pages returned from the cache still use the old urls causing all pages to be broken. Right now the guests cache is cleared ONLY by a couple of tasks (cleanup.php + clearcache.php) but until those tasks run the pages are broken as I mentioned above.
  9. It would probably help more if you can post the code in your Reborn.php file. Just remove any sensitive data before posting it.
  10. @Kevin Carwile Found a few more errors on the front-end this time around (the one above was in ACP). Here's a list below (all missing root namespaces - also IPS is custting down on call_user_func_array & func_get_args as well): Whoops\Exception\ErrorException thrown with message "You have used a function (in_array) that should be called from the root namespace for performance reasons (applications/advancedtagsprefixes/hooks/forumLastPostPrefix.php::270)." if ( isset( static::$contentItemClass ) and \IPS\Settings::i()->tags_enabled and in_array( 'IPS\Content\Tags', class_implements( static::$contentItemClass ) ) ) ==== Whoops\Exception\ErrorException thrown with message "You have used a function (is_null) that should be called from the root namespace for performance reasons (applications/advancedtagsprefixes/hooks/nodeModel.php::66)." There are 2 "is_null" instances on the same line here. if ( static::isTaggable() === TRUE and !is_null( static::$permApp ) and !is_null( static::$permType ) ) === Whoops\Exception\ErrorException thrown with message "You have used a function (in_array) that should be called from the root namespace for performance reasons (applications/advancedtagsprefixes/hooks/nodeModel.php::233)." if ( isset( static::$contentItemClass ) and \IPS\Settings::i()->tags_enabled and in_array( 'IPS\Content\Tags', class_implements( static::$contentItemClass ) ) ) === In the hook "applications/advancedtagsprefixes/hooks/forumLastPostPrefix.php" replace 3 instances of "call_user_func_array/func_get_args": return call_user_func_array( 'parent::setLastComment', func_get_args() ); with: return parent::setLastComment($comment); === In the hook "applications/advancedtagsprefixes/hooks/forumLastPostPrefix.php" replace 1 instance of "call_user_func_array/func_get_args/is_null": $result = call_user_func_array( 'parent::lastPost', func_get_args() ); if( !is_null( $result ) ) with: $result = parent::lastPost(); if( !\is_null( $result ) ) === In the hook "applications/advancedtagsprefixes/hooks/forumLastPostPrefix.php" replace 1 instance of "is_array/in_array": is_array( \IPS\Member::loggedIn()->modPermission( 'forums' ) ) and in_array( $this->_id, \IPS\Member::loggedIn()->modPermission( 'forums' ) ) with: \is_array( \IPS\Member::loggedIn()->modPermission( 'forums' ) ) and \in_array( $this->_id, \IPS\Member::loggedIn()->modPermission( 'forums' ) )
  11. @Adriano Faria Just a quick note that this application throws an error when using IN_DEV with 4.4 because 6 functions in the file applications/linkedaccounts/hooks/la_getAccounts.php don't use the root namespace. I simply updated the 2 functions in this line below 3 times: return call_user_func_array( 'parent::' . __FUNCTION__, func_get_args() ); to: return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() );
  12. @Kevin Carwile Here's a quick bug report after I upgraded the application to 3.2.0 on a site I manage for someone: PHP Warning: Declaration of IPS\Content\advancedtagsprefixes_hook_addPrefixToForm::tagsFormField($item, $container) should be compatible with IPS\Content\_Item::tagsFormField($item, $container, $minimized = false) in 141 on line 407 The fix is to simply update line 233 in the hook from: public static function tagsFormField( $item, $container ) to: public static function tagsFormField( $item, $container, $minimized = FALSE ) and also line 260 from: parent::tagsFormField( $item, $container ) to: parent::tagsFormField( $item, $container, $minimized ) 👍
  13. Just an update that's I've updated my dev board and I'm working on this mod (in my spare free time >.<). I'm currently looking into the activity stream issue and I also need to recode a portion of it to adhere to the new marketplace rules about no colums in the default tables. As far as I can remember I fixed that bug quite a while ago, but for the fix to work you first need to re-install the last version available and then uninstall it. If that still doesn't work let me know.
  14. I will take a look at the compatibility of this mod with 4.4.1 (and possibly all other mods, too) this weekend. Just a quick update for everyone since I've received a few PMs about it in the last days 🙂
  15. You have ) in the wrong place in your code after 'access_server', move it at the end: $form->add( new \IPS\Helpers\Form\Text('access_server',\IPS\Settings::i()->access_server) );
×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy